[Sheepdog] [PATCH] sheep: unify create_and_write logic for cow and regular object
Christoph Hellwig
hch at infradead.org
Wed Nov 16 09:18:41 CET 2011
On Wed, Nov 16, 2011 at 11:12:48AM +0800, Liu Yuan wrote:
> On 11/15/2011 04:21 PM, Christoph Hellwig wrote:
>
> > On Tue, Nov 15, 2011 at 04:18:52PM +0800, Liu Yuan wrote:
> >> Umm, seems useless, I just squeeze it to the code path. any noticeable
> >> performance penalty?
> >
> > With the current O_SYNC I/O model it at least means an additional log
> > force, which on disks will be very noticeable. So unless you really
> > see a difference in I/O patterns don't do it.
> >
>
>
> After a second thought, if we use DIO later, so this might not stand.
I can't really parse this sentence, can you explain it in a bit more
detail?
> In
> ext4, fallocate() will modify the metadata and write a journal
> transaction, but it may not be committed to the disk immediately.
I checked the code and ext4 is indeed buggy there - given that fallocate
doesn't just allocate new blocks but also updates the file size it
absolutey needs to commit the transaction before retourning to implement
O_SYNC/O_DSYNC semantics correctly.
More information about the sheepdog
mailing list