]> www.infradead.org Git - nvme.git/commit
bcachefs: Discard, invalidate workers are now per device
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 23 Jun 2024 04:53:44 +0000 (00:53 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 25 Jun 2024 22:47:55 +0000 (18:47 -0400)
commit64ee1431cc7d11e01a1007ead0afe737781cbbab
treee833a476f9f64b521cebea7cddea06cbc8439408
parent472237b69d071c877e97bf0bc3eab1be865fad29
bcachefs: Discard, invalidate workers are now per device

There's no reason for discards to be single threaded across all devices;
this will improve performance on multi device setups.

Additionally, making them per-device simplifies the refcounting on
bch_dev->io_ref; we now hold it for the duration that the discard path
is running, which fixes a race between the discard path and device
removal.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_background.h
fs/bcachefs/alloc_foreground.c
fs/bcachefs/bcachefs.h
fs/bcachefs/super.c