X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libbcachefs%2Fdirent.h;h=ad131e8edc29649da8a544f71d95740a13bfa480;hb=30cca2e94d0dfa8c3151daf1393f402d32bb9407;hp=e7f65fbd8e65fa984050619058388f25bfca0404;hpb=e61b61c03bf1f1eedc5e2dbd6887f77e45144a31;p=bcachefs-tools-debian diff --git a/libbcachefs/dirent.h b/libbcachefs/dirent.h index e7f65fb..ad131e8 100644 --- a/libbcachefs/dirent.h +++ b/libbcachefs/dirent.h @@ -6,13 +6,13 @@ extern const struct bch_hash_desc bch2_dirent_hash_desc; -const char *bch2_dirent_invalid(const struct bch_fs *, struct bkey_s_c); +int bch2_dirent_invalid(const struct bch_fs *, struct bkey_s_c, unsigned, struct printbuf *); void bch2_dirent_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); -#define bch2_bkey_ops_dirent (struct bkey_ops) { \ +#define bch2_bkey_ops_dirent ((struct bkey_ops) { \ .key_invalid = bch2_dirent_invalid, \ .val_to_text = bch2_dirent_to_text, \ -} +}) struct qstr; struct file; @@ -29,13 +29,13 @@ static inline unsigned dirent_val_u64s(unsigned len) sizeof(u64)); } +int bch2_dirent_read_target(struct btree_trans *, subvol_inum, + struct bkey_s_c_dirent, subvol_inum *); + int bch2_dirent_create(struct btree_trans *, subvol_inum, const struct bch_hash_info *, u8, const struct qstr *, u64, u64 *, int); -int __bch2_dirent_read_target(struct btree_trans *, struct bkey_s_c_dirent, - u32 *, u32 *, u64 *, bool); - static inline unsigned vfs_d_type(unsigned type) { return type == DT_SUBVOL ? DT_DIR : type;