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. Signed-off-by :Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp> 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.000000000 +0900 +++ linux-2.6.24-rc2/fs/ext3/fsync.c 2007-11-15 17:50:24.000000000 +0900 @@ -72,6 +72,9 @@ int ext3_sync_file(struct file * file, s goto out; } + if (datasync) + goto out; + /* * The VFS has written the file data. If the inode is unaltered * then we need not start a commit. diff -Nrup linux-2.6.24-rc2.org/fs/ext4/fsync.c linux-2.6.24-rc2/fs/ext4/fsync.c --- linux-2.6.24-rc2.org/fs/ext4/fsync.c 2007-11-07 06:57:46.000000000 +0900 +++ linux-2.6.24-rc2/fs/ext4/fsync.c 2007-11-15 17:50:54.000000000 +0900 @@ -72,6 +72,9 @@ int ext4_sync_file(struct file * file, s goto out; } + if (datasync) + goto out; + /* * The VFS has written the file data. If the inode is unaltered * then we need not start a commit.
| Jon Smirl | 463 kernel developers missing! |
| Nigel Cunningham | Re: [PATCH] Remove process freezer from suspend to RAM pathway |
| Greg KH | Re: [malware-list] [RFC 0/5] [TALPA] Intro to a linux interface for on access scan... |
| Jeff Garzik | Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.. |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Linus Torvalds | Re: [GIT]: Networking |
| Evgeniy Polyakov | Re: [BUG] New Kernel Bugs |
