bcachefs: Whiteout changes
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 29 Nov 2019 19:08:51 +0000 (14:08 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:32 +0000 (17:08 -0400)
commitc9bebae65eade6529f9d3068a6da42fc56664bfe
treeebf834840eb1ad862f684aae12ed3cb15f5d9388
parent183797e31d43ce2fbfc596ff3f4d034f1ba144d0
bcachefs: Whiteout changes

More prep work for snapshots: extents will soon be using
KEY_TYPE_deleted for whiteouts, with 0 size. But we wen't be able to
keep these whiteouts with the rest of the extents in the btree node, due
to sorting invariants breaking.

We can deal with this by immediately moving the new whiteouts to the
unwritten whiteouts area - this just means those whiteouts won't be
sorted, so we need new code to sort them prior to merging them with the
rest of the keys to be written.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_cache.c
fs/bcachefs/btree_io.c
fs/bcachefs/btree_types.h
fs/bcachefs/btree_update_interior.h
fs/bcachefs/btree_update_leaf.c