]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/inode.h
Update bcachefs sources to 6a3927a96b fixup! bcachefs: Don't use write side of mark_l...
[bcachefs-tools-debian] / libbcachefs / inode.h
index bb759a46dc415a57a4f76119036cb245fd2c645b..23c322d9a85b0e64a0fea7717a0a5618b2d47a98 100644 (file)
@@ -24,6 +24,14 @@ void bch2_inode_generation_to_text(struct printbuf *, struct bch_fs *,
        .val_to_text    = bch2_inode_generation_to_text,        \
 }
 
+#if 0
+typedef struct {
+       u64                     lo;
+       u32                     hi;
+} __packed __aligned(4) u96;
+#endif
+typedef u64 u96;
+
 struct bch_inode_unpacked {
        u64                     bi_inum;
        __le64                  bi_hash_seed;
@@ -43,7 +51,8 @@ struct bkey_inode_buf {
 #undef  x
 } __attribute__((packed, aligned(8)));
 
-void bch2_inode_pack(struct bkey_inode_buf *, const struct bch_inode_unpacked *);
+void bch2_inode_pack(struct bch_fs *, struct bkey_inode_buf *,
+                    const struct bch_inode_unpacked *);
 int bch2_inode_unpack(struct bkey_s_c_inode, struct bch_inode_unpacked *);
 
 struct btree_iter *bch2_inode_peek(struct btree_trans *,
@@ -60,12 +69,13 @@ void bch2_inode_init(struct bch_fs *, struct bch_inode_unpacked *,
                     uid_t, gid_t, umode_t, dev_t,
                     struct bch_inode_unpacked *);
 
-int bch2_inode_create(struct btree_trans *,
-                     struct bch_inode_unpacked *,
-                     u64, u64, u64 *);
+struct btree_iter *bch2_inode_create(struct btree_trans *,
+                                    struct bch_inode_unpacked *, u32);
 
-int bch2_inode_rm(struct bch_fs *, u64);
+int bch2_inode_rm(struct bch_fs *, u64, bool);
 
+int __bch2_inode_find_by_inum_trans(struct btree_trans *, u64,
+                                   struct bch_inode_unpacked *, unsigned);
 int bch2_inode_find_by_inum_trans(struct btree_trans *, u64,
                                  struct bch_inode_unpacked *);
 int bch2_inode_find_by_inum(struct bch_fs *, u64, struct bch_inode_unpacked *);
@@ -168,10 +178,4 @@ static inline void bch2_inode_nlink_set(struct bch_inode_unpacked *bi,
        }
 }
 
-#ifdef CONFIG_BCACHEFS_DEBUG
-void bch2_inode_pack_test(void);
-#else
-static inline void bch2_inode_pack_test(void) {}
-#endif
-
 #endif /* _BCACHEFS_INODE_H */