diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-10-25 02:51:34 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:08:45 +0300 |
commit | 801a3de6427924d87ecc7e218a99ad3245ee8290 (patch) | |
tree | 9fb234d536b6e5d8dbc990ea89ae80a8ca7aa35f /fs/bcachefs/reflink.h | |
parent | 13dcd4abcd8d4e177f4f75ea3f5c8838a8a8c3c3 (diff) | |
download | linux-801a3de6427924d87ecc7e218a99ad3245ee8290.tar.xz |
bcachefs: Indirect inline data extents
When inline data extents were added, reflink was forgotten about - we
need indirect inline data extents for reflink + inline data to work
correctly.
This patch adds them, and a new feature bit that's flipped when they're
used.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/reflink.h')
-rw-r--r-- | fs/bcachefs/reflink.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/bcachefs/reflink.h b/fs/bcachefs/reflink.h index 5445c1cf0797..9d5e7dc58f2b 100644 --- a/fs/bcachefs/reflink.h +++ b/fs/bcachefs/reflink.h @@ -18,13 +18,22 @@ const char *bch2_reflink_v_invalid(const struct bch_fs *, struct bkey_s_c); void bch2_reflink_v_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); - #define bch2_bkey_ops_reflink_v (struct bkey_ops) { \ .key_invalid = bch2_reflink_v_invalid, \ .val_to_text = bch2_reflink_v_to_text, \ .swab = bch2_ptr_swab, \ } +const char *bch2_indirect_inline_data_invalid(const struct bch_fs *, + struct bkey_s_c); +void bch2_indirect_inline_data_to_text(struct printbuf *, + struct bch_fs *, struct bkey_s_c); + +#define bch2_bkey_ops_indirect_inline_data (struct bkey_ops) { \ + .key_invalid = bch2_indirect_inline_data_invalid, \ + .val_to_text = bch2_indirect_inline_data_to_text, \ +} + s64 bch2_remap_range(struct bch_fs *, struct bpos, struct bpos, u64, u64 *, u64, s64 *); |