diff options
| author | Mikulas Patocka <mpatocka@redhat.com> | 2026-09-30 21:42:03 +0200 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2026-10-01 13:07:17 +0200 |
| commit | 8a0cc5f3446a324b13f62020eeddb32d6ba1c2db (patch) | |
| tree | e93c5f53f02f3f7b9d6fef5ccb4da8c421c6ec2f /tools/lib/python | |
| parent | b15dc73f60ebf02410bc7014ce34fb7fd1040045 (diff) | |
dm-writecache: fix uncommitted_blocks underflow
Revert the commit 39495b12ef1cf602e6abd350dce2ef4199906531
writecache_bio_copy_ssd sets wc->uncommitted_blocks = 0; and then queues
the flush work: queue_work(wc->writeback_wq, &wc->flush_work);
It may be possible that discard is dispatched in this window, and the
discard would decrement wc->uncommitted_blocks to -1U.
Note that this bug is benign - wc->uncommitted_blocks is only used to
trigged autocommit, so decrementing it to -1U will trigger a spurious
autocommit, but won't cause any data corruption.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Assisted-by: Claude:claude-opus-5
Fixes: 39495b12ef1c ("dm writecache: correct uncommitted_block when discarding uncommitted entry")
Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
