bug-parted
[Top][All Lists]
Advanced

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

Re: HFS Patch 15 out


From: Szakacsits Szabolcs
Subject: Re: HFS Patch 15 out
Date: Wed, 6 Oct 2004 13:51:24 +0200 (MEST)

On Tue, 5 Oct 2004, Andrew Clausen wrote:
> On Tue, Oct 05, 2004 at 02:42:35PM +0200, Szakacsits Szabolcs wrote:
> > Nowadays BLKFLSBUF is useless, it doesn't do anything (should flush and
> > invalidate buffers). To be honest, I even can't guess why parted uses it
> > instead of sync. It just seems wrong.
> 
> Parted does both.  Is it safe to just do fsync()?

You answered you question below, two api calls are more optimal.

But that's theory. In practise, I'm also aware the longstanding kernel
cache-coherency problems and given that BLKFLSBUF doesn't really work
anymore, well ... kernel developers are really doing their best to 
torture you and anybody who needs this kind of things ...

If the extra steps, I commented earlier, are workarounds for the broken
kernel then of course they make sense.

        Szaka

> > > on every umounted partitions of the disk, and that take (umount test
> > > and ioctl) an amount of time that is just too high for my high use of
> > > syncs.
> > 
> > Umount test? Ouch. Every partitions? Ouch again. I can't get this part
> > either. Perheps you're using a wrong API?
> 
> This is right... the code before HFS+ doesn't need to call sync() much,
> so it got overlooked.
> 
> You need this because you can get cache-coherency problems between
> partition and whole-disk devices.
> 
> There clearly needs to be two API calls... one paranoid and one
> for resizers that know they are the only ones accessing the disk.
> 
> Cheers,
> Andrew
> 
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]