Re: [RESEND] [PATCH] ext3,4:fdatasync should skip metadata writeout when overwriting

2008-02-06 Thread Hisashi Hifumi
atch. Thanks. [PATCH] ext3,4:fdatasync should skip metadata writeout when overwriting Currently fdatasync is identical to fsync in ext3,4. I think fdatasync should skip journal flush in data=ordered and data=writeback mode when it overwrites to already-instantiated blocks on HDD. When I_

Re: [RESEND] [PATCH] ext3,4:fdatasync should skip metadata writeout when overwriting

2008-02-06 Thread Jan Kara
Hi, > Currently fdatasync is identical to fsync in ext3,4. > I think fdatasync should skip journal flush in data=ordered and > data=writeback mode > when it overwrites to already-instantiated blocks on HDD. > When I_DIRTY_DATASYNC flag is not set, fdatasync should skip journal writeout > becaus

[RESEND] [PATCH] ext3,4:fdatasync should skip metadata writeout when overwriting

2008-02-04 Thread Hisashi Hifumi
Hi. Currently fdatasync is identical to fsync in ext3,4. I think fdatasync should skip journal flush in data=ordered and data=writeback mode when it overwrites to already-instantiated blocks on HDD. When I_DIRTY_DATASYNC flag is not set, fdatasync should skip journal writeout because this indicat

Re: [PATCH] ext3,4:fdatasync should skip metadata writeout

2007-11-19 Thread Hisashi Hifumi
At 11:59 07/11/16, Andrew Morton wrote: > >I suppose so. Although one wonders what earthly point there is in syncing >a file's data if we haven't yet written out the metadata which is required >for locating that data. > >IOW, fdatasync() is only useful if the application knows that it is overwri

Re: [PATCH] ext3,4:fdatasync should skip metadata writeout

2007-11-16 Thread Bryan Henderson
>fsync() will sync an inode even if only i_atime was changed. >fdatasync() would ignore such changes. I guess atime was the major >reason for creating fdatasync() in the first place. I think it was mtime. One doesn't normally call any kind of sync when one is just reading the file. But keeping

Re: [PATCH] ext3,4:fdatasync should skip metadata writeout

2007-11-15 Thread Jörn Engel
On Thu, 15 November 2007 18:59:19 -0800, Andrew Morton wrote: > On Fri, 16 Nov 2007 11:47:27 +0900 Hisashi Hifumi <[EMAIL PROTECTED]> wrote: > > > Currently fdatasync is identical to fsync in ext3,4. > > I think fdatasync should skip journal flush in data=ordered and > > data=writeback mode > > b

Re: [PATCH] ext3,4:fdatasync should skip metadata writeout

2007-11-15 Thread Andrew Morton
On Thu, 15 Nov 2007 22:47:40 -0500 Wendy Cheng <[EMAIL PROTECTED]> wrote: > Andrew Morton wrote: > > >On Fri, 16 Nov 2007 11:47:27 +0900 Hisashi Hifumi <[EMAIL PROTECTED]> wrote: > > > > > > > >>Currently fdatasync is identical to fsync in ext3,4. > >>I think fdatasync should skip journal flush

Re: [PATCH] ext3,4:fdatasync should skip metadata writeout

2007-11-15 Thread Jörn Engel
On Fri, 16 November 2007 11:47:27 +0900, Hisashi Hifumi wrote: > > diff -Nrup linux-2.6.24-rc2.org/fs/ext3/fsync.c > linux-2.6.24-rc2/fs/ext3/fsync.c > --- linux-2.6.24-rc2.org/fs/ext3/fsync.c 2007-11-07 06:57:46.0 > +0900 > +++ linux-2.6.24-rc2/fs/ext3/fsync.c 2007-11-15 17:50:24.

Re: [PATCH] ext3,4:fdatasync should skip metadata writeout

2007-11-15 Thread Wendy Cheng
Andrew Morton wrote: On Fri, 16 Nov 2007 11:47:27 +0900 Hisashi Hifumi <[EMAIL PROTECTED]> wrote: Currently fdatasync is identical to fsync in ext3,4. I think fdatasync should skip journal flush in data=ordered and data=writeback mode because this syscall is not required to synchronize the

[PATCH] ext3,4:fdatasync should skip metadata writeout

2007-11-15 Thread Hisashi Hifumi
Hi. Currently fdatasync is identical to fsync in ext3,4. I think fdatasync should skip journal flush in data=ordered and data=writeback mode because this syscall is not required to synchronize the metadata. My patch as below is similar to the approach of GFS2's fsync code(gfs2_fsync). Thanks. S

Re: [PATCH] ext3,4:fdatasync should skip metadata writeout

2007-11-15 Thread Andrew Morton
On Fri, 16 Nov 2007 11:47:27 +0900 Hisashi Hifumi <[EMAIL PROTECTED]> wrote: > Currently fdatasync is identical to fsync in ext3,4. > I think fdatasync should skip journal flush in data=ordered and > data=writeback mode > because this syscall is not required to synchronize the metadata. I suppos