mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
fb3f57bb11
This adds a new btree, rebalance_work, to eliminate scanning required for finding extents that need work done on them in the background - i.e. for the background_target and background_compression options. rebalance_work is a bitset btree, where a KEY_TYPE_set corresponds to an extent in the extents or reflink btree at the same pos. A new extent field is added, bch_extent_rebalance, which indicates that this extent has work that needs to be done in the background - and which options to use. This allows per-inode options to be propagated to indirect extents - at least in some circumstances. In this patch, changing IO options on a file will not propagate the new options to indirect extents pointed to by that file. Updating (setting/clearing) the rebalance_work btree is done by the extent trigger, which looks at the bch_extent_rebalance field. Scanning is still requrired after changing IO path options - either just for a given inode, or for the whole filesystem. We indicate that scanning is required by adding a KEY_TYPE_cookie key to the rebalance_work btree: the cookie counter is so that we can detect that scanning is still required when an option has been flipped mid-way through an existing scan. Future possible work: - Propagate options to indirect extents when being changed - Add other IO path options - nr_replicas, ec, to rebalance_work so they can be applied in the background when they change - Add a counter, for bcachefs fs usage output, showing the pending amount of rebalance work: we'll probably want to do this after the disk space accounting rewrite (moving it to a new btree) Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> |
||
---|---|---|
.. | ||
acl.c | ||
acl.h | ||
alloc_background.c | ||
alloc_background.h | ||
alloc_foreground.c | ||
alloc_foreground.h | ||
alloc_types.h | ||
backpointers.c | ||
backpointers.h | ||
bbpos_types.h | ||
bbpos.h | ||
bcachefs_format.h | ||
bcachefs_ioctl.h | ||
bcachefs.h | ||
bkey_buf.h | ||
bkey_cmp.h | ||
bkey_methods.c | ||
bkey_methods.h | ||
bkey_sort.c | ||
bkey_sort.h | ||
bkey.c | ||
bkey.h | ||
bset.c | ||
bset.h | ||
btree_cache.c | ||
btree_cache.h | ||
btree_gc.c | ||
btree_gc.h | ||
btree_io.c | ||
btree_io.h | ||
btree_iter.c | ||
btree_iter.h | ||
btree_journal_iter.c | ||
btree_journal_iter.h | ||
btree_key_cache.c | ||
btree_key_cache.h | ||
btree_locking.c | ||
btree_locking.h | ||
btree_trans_commit.c | ||
btree_types.h | ||
btree_update_interior.c | ||
btree_update_interior.h | ||
btree_update.c | ||
btree_update.h | ||
btree_write_buffer_types.h | ||
btree_write_buffer.c | ||
btree_write_buffer.h | ||
buckets_types.h | ||
buckets_waiting_for_journal_types.h | ||
buckets_waiting_for_journal.c | ||
buckets_waiting_for_journal.h | ||
buckets.c | ||
buckets.h | ||
chardev.c | ||
chardev.h | ||
checksum.c | ||
checksum.h | ||
clock_types.h | ||
clock.c | ||
clock.h | ||
compress.c | ||
compress.h | ||
counters.c | ||
counters.h | ||
darray.h | ||
data_update.c | ||
data_update.h | ||
debug.c | ||
debug.h | ||
dirent.c | ||
dirent.h | ||
disk_groups_types.h | ||
disk_groups.c | ||
disk_groups.h | ||
ec_types.h | ||
ec.c | ||
ec.h | ||
errcode.c | ||
errcode.h | ||
error.c | ||
error.h | ||
extent_update.c | ||
extent_update.h | ||
extents_types.h | ||
extents.c | ||
extents.h | ||
eytzinger.h | ||
fifo.h | ||
fs-common.c | ||
fs-common.h | ||
fs-io-buffered.c | ||
fs-io-buffered.h | ||
fs-io-direct.c | ||
fs-io-direct.h | ||
fs-io-pagecache.c | ||
fs-io-pagecache.h | ||
fs-io.c | ||
fs-io.h | ||
fs-ioctl.c | ||
fs-ioctl.h | ||
fs.c | ||
fs.h | ||
fsck.c | ||
fsck.h | ||
inode.c | ||
inode.h | ||
io_misc.c | ||
io_misc.h | ||
io_read.c | ||
io_read.h | ||
io_write_types.h | ||
io_write.c | ||
io_write.h | ||
journal_io.c | ||
journal_io.h | ||
journal_reclaim.c | ||
journal_reclaim.h | ||
journal_sb.c | ||
journal_sb.h | ||
journal_seq_blacklist.c | ||
journal_seq_blacklist.h | ||
journal_types.h | ||
journal.c | ||
journal.h | ||
Kconfig | ||
keylist_types.h | ||
keylist.c | ||
keylist.h | ||
logged_ops.c | ||
logged_ops.h | ||
lru.c | ||
lru.h | ||
Makefile | ||
mean_and_variance_test.c | ||
mean_and_variance.c | ||
mean_and_variance.h | ||
migrate.c | ||
migrate.h | ||
move_types.h | ||
move.c | ||
move.h | ||
movinggc.c | ||
movinggc.h | ||
nocow_locking_types.h | ||
nocow_locking.c | ||
nocow_locking.h | ||
opts.c | ||
opts.h | ||
printbuf.c | ||
printbuf.h | ||
quota_types.h | ||
quota.c | ||
quota.h | ||
rebalance_types.h | ||
rebalance.c | ||
rebalance.h | ||
recovery_types.h | ||
recovery.c | ||
recovery.h | ||
reflink.c | ||
reflink.h | ||
replicas_types.h | ||
replicas.c | ||
replicas.h | ||
sb-clean.c | ||
sb-clean.h | ||
sb-members.c | ||
sb-members.h | ||
seqmutex.h | ||
siphash.c | ||
siphash.h | ||
six.c | ||
six.h | ||
snapshot.c | ||
snapshot.h | ||
str_hash.h | ||
subvolume_types.h | ||
subvolume.c | ||
subvolume.h | ||
super_types.h | ||
super-io.c | ||
super-io.h | ||
super.c | ||
super.h | ||
sysfs.c | ||
sysfs.h | ||
tests.c | ||
tests.h | ||
trace.c | ||
trace.h | ||
two_state_shared_lock.c | ||
two_state_shared_lock.h | ||
util.c | ||
util.h | ||
varint.c | ||
varint.h | ||
vstructs.h | ||
xattr.c | ||
xattr.h |