aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoern Engel <joern@logfs.org>2008-02-06 04:36:59 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 13:41:03 -0500
commite7ca2d41a029577a8cff453d1445951d4f96bfd8 (patch)
tree60262e34e937ea9bfae7709a913ca940b928eae3
parent20420bba13bf79c86cab1e5bdfc4c938d9e44bc9 (diff)
Document I_SYNC and I_DATASYNC
After some archeology (see http://logfs.org/logfs/inode_state_bits) I finally figured out what the three I_DIRTY bits do. Maybe others would prefer less effort to reach this insight. Signed-off-by: Joern Engel <joern@logfs.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/fs.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index ed289a9c5ccb..e260d9a32c21 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1279,8 +1279,10 @@ struct super_operations {
1279 * 1279 *
1280 * Two bits are used for locking and completion notification, I_LOCK and I_SYNC. 1280 * Two bits are used for locking and completion notification, I_LOCK and I_SYNC.
1281 * 1281 *
1282 * I_DIRTY_SYNC Inode itself is dirty. 1282 * I_DIRTY_SYNC Inode is dirty, but doesn't have to be written on
1283 * I_DIRTY_DATASYNC Data-related inode changes pending 1283 * fdatasync(). i_atime is the usual cause.
1284 * I_DIRTY_DATASYNC Inode is dirty and must be written on fdatasync(), f.e.
1285 * because i_size changed.
1284 * I_DIRTY_PAGES Inode has dirty pages. Inode itself may be clean. 1286 * I_DIRTY_PAGES Inode has dirty pages. Inode itself may be clean.
1285 * I_NEW get_new_inode() sets i_state to I_LOCK|I_NEW. Both 1287 * I_NEW get_new_inode() sets i_state to I_LOCK|I_NEW. Both
1286 * are cleared by unlock_new_inode(), called from iget(). 1288 * are cleared by unlock_new_inode(), called from iget().
@@ -1312,8 +1314,6 @@ struct super_operations {
1312 * purpose reduces latency and prevents some filesystem- 1314 * purpose reduces latency and prevents some filesystem-
1313 * specific deadlocks. 1315 * specific deadlocks.
1314 * 1316 *
1315 * Q: Why does I_DIRTY_DATASYNC exist? It appears as if it could be replaced
1316 * by (I_DIRTY_SYNC|I_DIRTY_PAGES).
1317 * Q: What is the difference between I_WILL_FREE and I_FREEING? 1317 * Q: What is the difference between I_WILL_FREE and I_FREEING?
1318 * Q: igrab() only checks on (I_FREEING|I_WILL_FREE). Should it also check on 1318 * Q: igrab() only checks on (I_FREEING|I_WILL_FREE). Should it also check on
1319 * I_CLEAR? If not, why? 1319 * I_CLEAR? If not, why?