bcachefs: Data update support for unwritten extents
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 14 Nov 2022 06:31:10 +0000 (01:31 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:51 +0000 (17:09 -0400)
commit4dcd1cae72912ab08d313ee5a730608022b211d4
tree1e44e47d2061f60ef1e88d677354bbbde846567d
parent792031116bee35e13be7c8ae8cf1b8eec141b136
bcachefs: Data update support for unwritten extents

The data update path requires special support for unwritten extents - we
still need to be able to move them, but there's no need to read or write
anything.

This patch adds a new error code to tell bch2_move_extent() that we're
short circuiting the read, and adds bch2_update_unwritten_extent() to
create a reservation then call __bch2_data_update_index_update().

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/data_update.c
fs/bcachefs/data_update.h
fs/bcachefs/errcode.h
fs/bcachefs/move.c