tech-kern archive

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

Re: syncing a directory

On Thu, Jul 10, 2008 at 07:58:52PM +0200, Manuel Bouyer wrote:
> On Thu, Jul 10, 2008 at 12:50:56PM -0500, David Young wrote:
> > > Actually, we do have that: fsync_range(fd, FDISKSYNC, ...).
> > 
> > I thought while we do have an API, we do not have a reliable
> > implementation, because we cannot reliably flush the write cache on
> > many disks, especially those that are connected through inexpensive
> > USB->IDE adapters.
> it's true. Some (old) IDE disks also don't have the FLUSH_CACHE command.
> In such cases I can't see what improvements could be done. It's not the
> implementation which is unreliable, it's the hardware.

Do the disks reliably indicate that FLUSH_CACHE is not supported with
either a capabilities flag or an error code?

I think that the fsync_range() implementation is unreliable if it does
not fail (EIO) when the hardware has not fulfilled the request.


David Young             OJC Technologies      Urbana, IL * (217) 278-3933 ext 24

Home | Main Index | Thread Index | Old Index