NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/53152: fsync error chain lossage

The following reply was made to PR kern/53152; it has been noted by GNATS.

From: (Michael van Elst)
Subject: Re: kern/53152: fsync error chain lossage
Date: Wed, 4 Apr 2018 07:54:27 -0000 (UTC) (David Holland) writes:
 > It isn't entirely clear what we should do in general, since (outside
 > of lfs) we have no ability after a hard write error to put the
 > contents somewhere else and keeping a doomed block around forever is a
 > useless waste of memory; but on the other hand it seems like the user
 > should be able to retry fsync if they want to... and if they do, it
 > should really retry and in particular not bogusly report success.
 A simple retry for the same block on that level is unlikely to succeed.
 You'd need some kind of bad-block mapping or other recovery, which is
 probably closer to the device level than putpages.
 Please also note that a successful write doesn't mean that the data
 can be read back. Putting lots of effort into retrying failed writes
 isn't that useful and on the FFS level, as you said, there is no other
 recovery possible.
 So the alternative to recovery is to record the error with the
 mount point and trigger other actions, like making the mount
 read-only, or even issuing a panic().
                                 Michael van Elst
                                 "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index