Thread (11 messages) 11 messages, 6 authors, 2008-02-07

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

From: Bryan Henderson <hidden>
Date: 2007-11-16 18:12:14
Also in: linux-fsdevel

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 an accurate mtime is often not 
worth the I/O.

And theoretically, there could be all kinds of "truly meta" metadata that 
changes as you write to the file but would probably be considered more 
expendable than the file's actual data.

But I think it was always intended that fdatasync() would sync the data in 
a meaningful way -- i.e. such that the data can be retrieved after a 
system failure; it surely wasn't meant for the user to understand 
filesystem internals.  I've heard the term "data-related metadata" to 
distinguish such things as allocation maps and pointer blocks from mtime, 
permissions, etc.

--
Bryan Henderson                     IBM Almaden Research Center
San Jose CA                         Filesystems
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help