bcachefs: Rework of cut_front & cut_back
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 10 Nov 2019 00:02:48 +0000 (19:02 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:32 +0000 (17:08 -0400)
commit085ab69357e091613625f1505d667b6a5a3ec881
treedf5f4d2d258b9bade329e662464a6a3139a7f384
parentad44bdc351faeacb9b7294f1689ac76babf379ad
bcachefs: Rework of cut_front & cut_back

This changes bch2_cut_front and bch2_cut_back so that they're able to
shorten the size of the value, and it also changes the extent update
path to update the accounting in the btree node when this happens.

When the size of the value is shortened, they zero out the space that's
no longer used, so it's interpreted as noops (as implemented in the last
patch).

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bkey_sort.c
fs/bcachefs/bset.h
fs/bcachefs/btree_update_leaf.c
fs/bcachefs/extents.c
fs/bcachefs/extents.h
fs/bcachefs/fs-io.c
fs/bcachefs/io.c
fs/bcachefs/move.c
fs/bcachefs/recovery.c
fs/bcachefs/reflink.c