On 5/23/07, Shilpa Sheoran <[EMAIL PROTECTED]> wrote:
Linux 2.6.9
and the media is Nand Flash memory.
/dir1/dir2/dir3

/dir1/dir2 is readonly (cramfs)
dir3 is read write (Flash mem). and I'm creating the database in dir3.

There is your problem. The file system on that directory (I would
guess JFS2 or similar), doesn't support the fsync() call.

The reason has probably to do with the fact the system driver reserves
the right to choose when to do the real write (else a bugged program
or even a malicious user could wear off the device).

That is probably done every 5 seconds or so (is usually configurable
by a kernel parameter), but has the drawback of messing with the ACID
nature of SQLite.


Regards,
~Nuno Lucas

Somehow I don't have a problem in a tmpfs.
The strace showed no diff between tmpfs and this directory where it is
giving I/O error.

Thanks

On 5/22/07, Joe Wilson <[EMAIL PROTECTED]> wrote:
> What is the OS you're using and what kind of media is it?
> Hard drive or USB key or ???
>
> --- Shilpa Sheoran <[EMAIL PROTECTED]> wrote:
> > It seems that  rc = fsync(fd); is failing in function
> >  static int full_fsync(int fd, int fullSync, int dataOnly) in file os_unix.c
> > {
> > #else /* if !defined(F_FULLSYNC) */
> >   if( dataOnly ){
> >     rc = fdatasync(fd);
> >   }else{
> >
> > //*********************this call is failing********************
> >    rc = fsync(fd);
> >   }
> >
> > }
> >
> > using -DSQLITE_NO_SYNC in the Makefile works
> > What is the way out for this problem?
> > What happens if we use this option -DSQLITE_NO_SYNC ?

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to