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>
Showing
- fs/bcachefs/alloc_background.c 139 additions, 124 deletionsfs/bcachefs/alloc_background.c
- fs/bcachefs/alloc_background.h 5 additions, 1 deletionfs/bcachefs/alloc_background.h
- fs/bcachefs/alloc_foreground.c 2 additions, 2 deletionsfs/bcachefs/alloc_foreground.c
- fs/bcachefs/bcachefs.h 11 additions, 5 deletionsfs/bcachefs/bcachefs.h
- fs/bcachefs/super.c 4 additions, 1 deletionfs/bcachefs/super.c
Please register or sign in to comment