diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-04-04 04:50:25 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:30 +0300 |
commit | 275c8426fb8fd475e9991b3aa1b20f66069e594f (patch) | |
tree | f3e085040653dd86977f3fe73ce87730ab699556 /fs/bcachefs/reflink.h | |
parent | e1effd42a1cb40048002f594c12e823b5e33ed5d (diff) | |
download | linux-275c8426fb8fd475e9991b3aa1b20f66069e594f.tar.xz |
bcachefs: Add rw to .key_invalid()
This adds a new parameter to .key_invalid() methods for whether the key
is being read or written; the idea being that methods can do more
aggressive checks when a key is newly created and being written, when we
wouldn't want to delete the key because of those checks.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/reflink.h')
-rw-r--r-- | fs/bcachefs/reflink.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/bcachefs/reflink.h b/fs/bcachefs/reflink.h index d292761f8a98..e0a9d8e4d1ca 100644 --- a/fs/bcachefs/reflink.h +++ b/fs/bcachefs/reflink.h @@ -2,7 +2,8 @@ #ifndef _BCACHEFS_REFLINK_H #define _BCACHEFS_REFLINK_H -int bch2_reflink_p_invalid(const struct bch_fs *, struct bkey_s_c, struct printbuf *); +int bch2_reflink_p_invalid(const struct bch_fs *, struct bkey_s_c, + int, struct printbuf *); void bch2_reflink_p_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); bool bch2_reflink_p_merge(struct bch_fs *, struct bkey_s, struct bkey_s_c); @@ -15,7 +16,8 @@ bool bch2_reflink_p_merge(struct bch_fs *, struct bkey_s, struct bkey_s_c); .atomic_trigger = bch2_mark_reflink_p, \ } -int bch2_reflink_v_invalid(const struct bch_fs *, struct bkey_s_c, struct printbuf *); +int bch2_reflink_v_invalid(const struct bch_fs *, struct bkey_s_c, + int, struct printbuf *); void bch2_reflink_v_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); int bch2_trans_mark_reflink_v(struct btree_trans *, struct bkey_s_c, @@ -30,7 +32,7 @@ int bch2_trans_mark_reflink_v(struct btree_trans *, struct bkey_s_c, } int bch2_indirect_inline_data_invalid(const struct bch_fs *, struct bkey_s_c, - struct printbuf *); + int, struct printbuf *); void bch2_indirect_inline_data_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); int bch2_trans_mark_indirect_inline_data(struct btree_trans *, |