diff options
author | 2019-11-13 16:03:15 +0800 | |
---|---|---|
committer | 2019-11-13 15:42:49 -0700 | |
commit | c0e0954e909c17b43d176ab219fc598964616ae6 (patch) | |
tree | 0f16001bfb90ec3539dc6fa0498d2d4a61b1c1d9 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Merge branch 'md-next' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.5/drivers (diff) | |
download | linux-rng-c0e0954e909c17b43d176ab219fc598964616ae6.tar.xz linux-rng-c0e0954e909c17b43d176ab219fc598964616ae6.zip |
bcache: fix fifo index swapping condition in journal_pin_cmp()
Fifo structure journal.pin is implemented by a cycle buffer, if the back
index reaches highest location of the cycle buffer, it will be swapped
to 0. Once the swapping happens, it means a smaller fifo index might be
associated to a newer journal entry. So the btree node with oldest
journal entry won't be selected in bch_btree_leaf_dirty() to reference
the dirty B+tree leaf node. This problem may cause bcache journal won't
protect unflushed oldest B+tree dirty leaf node in power failure, and
this B+tree leaf node is possible to beinconsistent after reboot from
power failure.
This patch fixes the fifo index comparing logic in journal_pin_cmp(),
to avoid potential corrupted B+tree leaf node when the back index of
journal pin is swapped.
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions