]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/inode.h
Update bcachefs sources to 99175e5712 bcachefs: Fix bch2_check_discard_freespace_key()
[bcachefs-tools-debian] / libbcachefs / inode.h
index 88dfae42ff7be5e60a7b6966d1a072522cd98304..0c3022d3f995f00ef0bfe99de85a6f50877e9032 100644 (file)
@@ -7,9 +7,9 @@
 
 extern const char * const bch2_inode_opts[];
 
-int bch2_inode_invalid(const struct bch_fs *, struct bkey_s_c, int, struct printbuf *);
-int bch2_inode_v2_invalid(const struct bch_fs *, struct bkey_s_c, int, struct printbuf *);
-int bch2_inode_v3_invalid(const struct bch_fs *, struct bkey_s_c, int, struct printbuf *);
+int bch2_inode_invalid(const struct bch_fs *, struct bkey_s_c, unsigned, struct printbuf *);
+int bch2_inode_v2_invalid(const struct bch_fs *, struct bkey_s_c, unsigned, struct printbuf *);
+int bch2_inode_v3_invalid(const struct bch_fs *, struct bkey_s_c, unsigned, struct printbuf *);
 void bch2_inode_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
 
 #define bch2_bkey_ops_inode ((struct bkey_ops) {       \
@@ -17,6 +17,7 @@ void bch2_inode_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
        .val_to_text    = bch2_inode_to_text,           \
        .trans_trigger  = bch2_trans_mark_inode,        \
        .atomic_trigger = bch2_mark_inode,              \
+       .min_val_size   = 16,                           \
 })
 
 #define bch2_bkey_ops_inode_v2 ((struct bkey_ops) {    \
@@ -24,6 +25,7 @@ void bch2_inode_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
        .val_to_text    = bch2_inode_to_text,           \
        .trans_trigger  = bch2_trans_mark_inode,        \
        .atomic_trigger = bch2_mark_inode,              \
+       .min_val_size   = 32,                           \
 })
 
 #define bch2_bkey_ops_inode_v3 ((struct bkey_ops) {    \
@@ -31,6 +33,7 @@ void bch2_inode_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
        .val_to_text    = bch2_inode_to_text,           \
        .trans_trigger  = bch2_trans_mark_inode,        \
        .atomic_trigger = bch2_mark_inode,              \
+       .min_val_size   = 48,                           \
 })
 
 static inline bool bkey_is_inode(const struct bkey *k)
@@ -41,12 +44,13 @@ static inline bool bkey_is_inode(const struct bkey *k)
 }
 
 int bch2_inode_generation_invalid(const struct bch_fs *, struct bkey_s_c,
-                                 int, struct printbuf *);
+                                 unsigned, struct printbuf *);
 void bch2_inode_generation_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
 
 #define bch2_bkey_ops_inode_generation ((struct bkey_ops) {    \
        .key_invalid    = bch2_inode_generation_invalid,        \
        .val_to_text    = bch2_inode_generation_to_text,        \
+       .min_val_size   = 8,                                    \
 })
 
 #if 0
@@ -82,7 +86,7 @@ struct bkey_inode_buf {
 
 void bch2_inode_pack(struct bkey_inode_buf *, const struct bch_inode_unpacked *);
 int bch2_inode_unpack(struct bkey_s_c, struct bch_inode_unpacked *);
-struct bkey_s_c bch2_inode_to_v3(struct btree_trans *, struct bkey_s_c);
+struct bkey_i *bch2_inode_to_v3(struct btree_trans *, struct bkey_i *);
 
 void bch2_inode_unpacked_to_text(struct printbuf *, struct bch_inode_unpacked *);