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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: Hisashi Hifumi <hifumi.hisashi@...>, <linux-ext4@...>, <linux-fsdevel@...>
Date: Thursday, November 15, 2007 - 11:17 pm

On Thu, 15 November 2007 18:59:19 -0800, Andrew Morton wrote:

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.

The patch I sent you just minutes ago sorta documents this.
I_DIRTY_DATASYNC was added with patch-2.4.0-test12 for just this reason.

So basically an application can almost always use fdatasync() instead of
fsync() and rely on the kernel to only cut corners, if doing so will not
endanger the data synced to disk.

Jörn

-- 
Joern's library part 6:
http://www.gzip.org/zlib/feldspar.html
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] ext3,4:fdatasync should skip metadata writeout, Hisashi Hifumi, (Thu Nov 15, 10:47 pm)
Re: [PATCH] ext3,4:fdatasync should skip metadata writeout, Andrew Morton, (Thu Nov 15, 10:59 pm)
Re: [PATCH] ext3,4:fdatasync should skip metadata writeout, Hisashi Hifumi, (Tue Nov 20, 3:20 am)
Re: [PATCH] ext3,4:fdatasync should skip metadata writeout, Andrew Morton, (Thu Nov 15, 11:53 pm)
Re: [PATCH] ext3,4:fdatasync should skip metadata writeout, Jörn, (Thu Nov 15, 11:17 pm)
Re: [PATCH] ext3,4:fdatasync should skip metadata writeout, Bryan Henderson, (Fri Nov 16, 2:12 pm)