On 23 Jun 2015, at 6:01am, Mayank Kumar (mayankum) <mayankum at cisco.com> 
wrote:

> Do you think if sqlite3_step or sqlite3_open fail with this error, we should 
> treat this as transaction committed and ignore the fsync error and it will be 
> retried with the next commit or read and eventually will sync unless I see 
> this error continuously in which case we can treat this as catastrophic.
> 
> Also I wanted to know if fsync requires space on the filesystem since in our 
> case nvram has little space(200mb), do you think fsync could fail because of 
> that as well?

You can't ignore fsync() since it indicates that future changes to the file may 
not be valid, with no errors reporting the problems (because an error has 
already been reported).  So yes your program should crash.

But I've never seen fsync() in real life except when it indicated a hardware 
problem of some kind -- either a badly connected cable or a bug in the mass 
storage driver.  Software problems which might cause fsync() to fail are beyond 
my competence.  Sorry.

Simon.

Reply via email to