summaryrefslogtreecommitdiff
path: root/fs/bcachefs/dirent.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-10-02 18:35:36 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:28 -0400
commit9638574229e3ae0175a46a63431149746c777b3a (patch)
tree01cd8a76741a838f2e3a99690ea661bca7c457a9 /fs/bcachefs/dirent.h
parent73501ab82c44b1249916ded8dcb883f7705b1549 (diff)
bcachefs: Factor out fs-common.c
This refactoring makes the code easier to understand by separating the bcachefs btree transactional code from the linux VFS code - but more importantly, it's also to share code with the fuse port. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/dirent.h')
-rw-r--r--fs/bcachefs/dirent.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/fs/bcachefs/dirent.h b/fs/bcachefs/dirent.h
index bc64718a7832..9a57ad005468 100644
--- a/fs/bcachefs/dirent.h
+++ b/fs/bcachefs/dirent.h
@@ -29,15 +29,13 @@ static inline unsigned dirent_val_u64s(unsigned len)
sizeof(u64));
}
-int __bch2_dirent_create(struct btree_trans *, u64,
- const struct bch_hash_info *, u8,
- const struct qstr *, u64, int);
-int bch2_dirent_create(struct bch_fs *c, u64, const struct bch_hash_info *,
- u8, const struct qstr *, u64, u64 *, int);
-
-int __bch2_dirent_delete(struct btree_trans *, u64,
- const struct bch_hash_info *,
- const struct qstr *);
+int bch2_dirent_create(struct btree_trans *, u64,
+ const struct bch_hash_info *, u8,
+ const struct qstr *, u64, int);
+
+int bch2_dirent_delete_at(struct btree_trans *,
+ const struct bch_hash_info *,
+ struct btree_iter *);
int bch2_dirent_delete(struct bch_fs *, u64, const struct bch_hash_info *,
const struct qstr *, u64 *);
@@ -48,15 +46,20 @@ enum bch_rename_mode {
};
int bch2_dirent_rename(struct btree_trans *,
- struct bch_inode_info *, const struct qstr *,
- struct bch_inode_info *, const struct qstr *,
+ u64, struct bch_hash_info *,
+ u64, struct bch_hash_info *,
+ const struct qstr *, u64 *,
+ const struct qstr *, u64 *,
enum bch_rename_mode);
+struct btree_iter *
+__bch2_dirent_lookup_trans(struct btree_trans *, u64,
+ const struct bch_hash_info *,
+ const struct qstr *);
u64 bch2_dirent_lookup(struct bch_fs *, u64, const struct bch_hash_info *,
const struct qstr *);
int bch2_empty_dir_trans(struct btree_trans *, u64);
-int bch2_empty_dir(struct bch_fs *, u64);
-int bch2_readdir(struct bch_fs *, struct file *, struct dir_context *);
+int bch2_readdir(struct bch_fs *, u64, struct dir_context *);
#endif /* _BCACHEFS_DIRENT_H */