On Tue, Jun 23, 2015 at 09:12:31PM +0100, Simon Slavin wrote:
> On 23 Jun 2015, at 8:49pm, Mayank Kumar (mayankum) <mayankum at cisco.com> 
> wrote:
> > Thanks all for the useful inputs. One more question I have is can
> > the 1034 error code ever mean that disk is full or nvram is full and
> > hence it cannot fsync ?
> 
> The error for 'disk full' should never happen at fsync().  It should
> happen at the operation which requests the additional disk space,
> which is probably fwrite().

It could happen as a result of a bug in a COW-style filesystem.  The
space needed to write metadata needs to be acquired at write()-time, not
fsync()-time, but it wouldn't surprise me to see filesystems that don't
check until sync time.

As others have pointed out, fsync() errors are essentially like EIO.

Except for "oops, someone tripped over the cable" or "the user removed
the removable storage device before we were done" type errors, these are
not recoverable.  You can't really know if the error is recoverable
though.  Simply retrying is not appropriate.  If the application is
running on a modern phone, say, then the error is probably not retriable
(most new phones don't have micro-SDcard slots anymore, right?).  If the
application is running on a server, then the error is not retriable.  If
it's running on a desktop, it might be retriable.

Nico
-- 

Reply via email to