]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/reflink.h
Update bcachefs sources to b9bd69421f73 bcachefs: x-macro-ify inode flags enum
[bcachefs-tools-debian] / libbcachefs / reflink.h
index ce0012aa99c6a506a76aeb3132ceff05b6106e32..8ccf3f9c4939eed45d9d9dc231bf5632506de836 100644 (file)
@@ -2,8 +2,10 @@
 #ifndef _BCACHEFS_REFLINK_H
 #define _BCACHEFS_REFLINK_H
 
-int bch2_reflink_p_invalid(const struct bch_fs *, struct bkey_s_c,
-                          int, struct printbuf *);
+enum bkey_invalid_flags;
+
+int bch2_reflink_p_invalid(struct bch_fs *, struct bkey_s_c,
+                          enum bkey_invalid_flags, 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);
@@ -14,10 +16,11 @@ bool bch2_reflink_p_merge(struct bch_fs *, struct bkey_s, struct bkey_s_c);
        .key_merge      = bch2_reflink_p_merge,                 \
        .trans_trigger  = bch2_trans_mark_reflink_p,            \
        .atomic_trigger = bch2_mark_reflink_p,                  \
+       .min_val_size   = 16,                                   \
 })
 
-int bch2_reflink_v_invalid(const struct bch_fs *, struct bkey_s_c,
-                          int, struct printbuf *);
+int bch2_reflink_v_invalid(struct bch_fs *, struct bkey_s_c,
+                          enum bkey_invalid_flags, 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 *, enum btree_id, unsigned,
@@ -29,10 +32,11 @@ int bch2_trans_mark_reflink_v(struct btree_trans *, enum btree_id, unsigned,
        .swab           = bch2_ptr_swab,                        \
        .trans_trigger  = bch2_trans_mark_reflink_v,            \
        .atomic_trigger = bch2_mark_extent,                     \
+       .min_val_size   = 8,                                    \
 })
 
-int bch2_indirect_inline_data_invalid(const struct bch_fs *, struct bkey_s_c,
-                                     int, struct printbuf *);
+int bch2_indirect_inline_data_invalid(struct bch_fs *, struct bkey_s_c,
+                                     enum bkey_invalid_flags, 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 *,
@@ -44,6 +48,7 @@ int bch2_trans_mark_indirect_inline_data(struct btree_trans *,
        .key_invalid    = bch2_indirect_inline_data_invalid,    \
        .val_to_text    = bch2_indirect_inline_data_to_text,    \
        .trans_trigger  = bch2_trans_mark_indirect_inline_data, \
+       .min_val_size   = 8,                                    \
 })
 
 static inline const __le64 *bkey_refcount_c(struct bkey_s_c k)