]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bcache: get rid of discard code from journal
authorColy Li <colyli@fnnas.com>
Thu, 13 Nov 2025 05:36:22 +0000 (13:36 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Nov 2025 16:18:06 +0000 (09:18 -0700)
commit0c72e9fcc156caaf123a6291321bc9bd74cd1b61
tree06ae437e856a31d3a8b723fc77a2b97a45c3fc5e
parent7b2038b1b1d4322a851ce7ee378ebf85a03bb1a1
bcache: get rid of discard code from journal

In bcache journal there is discard functionality but almost useless in
reality. Because discard happens after a journal bucket is reclaimed,
and the reclaimed bucket is allocated for new journaling immediately.
There is no time for underlying SSD to use the discard hint for internal
data management.

The discard code in bcache journal doesn't bring any performance
optimization and wastes CPU cycles for issuing discard bios. Therefore
this patch gits rid of it from journal.c and journal.h.

Signed-off-by: Coly Li <colyli@fnnas.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/journal.c
drivers/md/bcache/journal.h