summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2006-09-11 15:13:37 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-13 13:23:22 -0700
commit675c2387af2fef39c82d41a0633c72f3904e5025 (patch)
treed89eed216c007abf11f62d441643e27f558cc8fd /kernel
parent566047d531c7853f5ed7d7638c4064aaf525b3b2 (diff)
jbd: fix commit of ordered data buffers
Original commit code assumes, that when a buffer on BJ_SyncData list is locked, it is being written to disk. But this is not true and hence it can lead to a potential data loss on crash. Also the code didn't count with the fact that journal_dirty_data() can steal buffers from committing transaction and hence could write buffers that no longer belong to the committing transaction. Finally it could possibly happen that we tried writing out one buffer several times. The patch below tries to solve these problems by a complete rewrite of the data commit code. We go through buffers on t_sync_datalist, lock buffers needing write out and store them in an array. Buffers are also immediately refiled to BJ_Locked list or unfiled (if the write out is completed). When the array is full or we have to block on buffer lock, we submit all accumulated buffers for IO. [suitable for 2.6.18.x around the 2.6.19-rc2 timeframe] Signed-off-by: Jan Kara <jack@suse.cz> Cc: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions