]> www.infradead.org Git - users/hch/misc.git/commit
bcachefs: Split up bch_dev.io_ref
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 30 Mar 2025 03:11:08 +0000 (23:11 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 2 Apr 2025 14:24:34 +0000 (10:24 -0400)
commitdcffc3b1ae3251d796a25c673f614e3099ca83d3
tree7b5a5ada3f5ca8e5bda8ab38a396f2c3730fd792
parentf1350c2c74e62afbc77048ed35718f42b3baba91
bcachefs: Split up bch_dev.io_ref

We now have separate per device io_refs for read and write access.

This fixes a device removal bug where the discard workers were still
running while we're removing alloc info for that device.

It's also a bit of hardening; we no longer allow writes to devices that
are read-only.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
19 files changed:
fs/bcachefs/alloc_background.c
fs/bcachefs/backpointers.c
fs/bcachefs/bcachefs.h
fs/bcachefs/btree_io.c
fs/bcachefs/btree_node_scan.c
fs/bcachefs/buckets.c
fs/bcachefs/chardev.c
fs/bcachefs/debug.c
fs/bcachefs/disk_groups.c
fs/bcachefs/ec.c
fs/bcachefs/fs-io.c
fs/bcachefs/fs.c
fs/bcachefs/io_read.c
fs/bcachefs/io_write.c
fs/bcachefs/journal.c
fs/bcachefs/journal_io.c
fs/bcachefs/sb-members.h
fs/bcachefs/super-io.c
fs/bcachefs/super.c