android_kernel_xiaomi_sm8350/fs/jbd
Jan Kara 3998b9301d [PATCH] 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>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-26 08:48:44 -07:00
..
checkpoint.c [PATCH] JBD: split checkpoint lists 2006-06-23 07:43:08 -07:00
commit.c [PATCH] jbd: fix commit of ordered data buffers 2006-09-26 08:48:44 -07:00
journal.c [PATCH] Manage jbd allocations from its own slabs 2006-08-27 11:01:32 -07:00
Makefile
recovery.c [PATCH] ext3: fix memory leak when the journal file is corrupted 2006-06-25 10:01:07 -07:00
revoke.c
transaction.c [PATCH] manage-jbd-its-own-slab fix 2006-09-01 11:39:10 -07:00