diff options
author | Nick Piggin <npiggin@suse.de> | 2009-01-06 23:40:25 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-07 00:59:09 +0100 |
commit | 4f5a99d64c17470a784a6c68064207d82e3e74a5 (patch) | |
tree | 2a3e0f0c3990bb8dbda2cdaa506a64180e5cbff2 /include/linux/writeback.h | |
parent | UBIFS: do not use WB_SYNC_HOLD (diff) | |
download | linux-4f5a99d64c17470a784a6c68064207d82e3e74a5.tar.xz linux-4f5a99d64c17470a784a6c68064207d82e3e74a5.zip |
fs: remove WB_SYNC_HOLD
Remove WB_SYNC_HOLD. The primary motiviation is the design of my
anti-starvation code for fsync. It requires taking an inode lock over the
sync operation, so we could run into lock ordering problems with multiple
inodes. It is possible to take a single global lock to solve the ordering
problem, but then that would prevent a future nice implementation of "sync
multiple inodes" based on lock order via inode address.
Seems like a backward step to remove this, but actually it is busted
anyway: we can't use the inode lists for data integrity wait: an inode can
be taken off the dirty lists but still be under writeback. In order to
satisfy data integrity semantics, we should wait for it to finish
writeback, but if we only search the dirty lists, we'll miss it.
It would be possible to have a "writeback" list, for sys_sync, I suppose.
But why complicate things by prematurely optimise? For unmounting, we
could avoid the "livelock avoidance" code, which would be easier, but
again premature IMO.
Fixing the existing data integrity problem will come next.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r-- | include/linux/writeback.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index bb28c975c1d7..7300ecdc480c 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -30,7 +30,6 @@ static inline int task_is_pdflush(struct task_struct *task) enum writeback_sync_modes { WB_SYNC_NONE, /* Don't wait on anything */ WB_SYNC_ALL, /* Wait on every mapping */ - WB_SYNC_HOLD, /* Hold the inode on sb_dirty for sys_sync() */ }; /* |