summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/fs-common.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/fs-common.h
parent73501ab82c44b1249916ded8dcb883f7705b1549 (diff)
downloadlinux-9638574229e3ae0175a46a63431149746c777b3a.tar.gz
linux-9638574229e3ae0175a46a63431149746c777b3a.tar.bz2
linux-9638574229e3ae0175a46a63431149746c777b3a.zip
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/fs-common.h')
-rw-r--r--fs/bcachefs/fs-common.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/fs/bcachefs/fs-common.h b/fs/bcachefs/fs-common.h
new file mode 100644
index 000000000000..7adcfcf92aec
--- /dev/null
+++ b/fs/bcachefs/fs-common.h
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _BCACHEFS_FS_COMMON_H
+#define _BCACHEFS_FS_COMMON_H
+
+struct posix_acl;
+
+int bch2_create_trans(struct btree_trans *, u64,
+ struct bch_inode_unpacked *,
+ struct bch_inode_unpacked *,
+ const struct qstr *,
+ uid_t, gid_t, umode_t, dev_t,
+ struct posix_acl *,
+ struct posix_acl *);
+
+int bch2_link_trans(struct btree_trans *,
+ u64,
+ u64, struct bch_inode_unpacked *,
+ const struct qstr *);
+
+int bch2_unlink_trans(struct btree_trans *,
+ u64, struct bch_inode_unpacked *,
+ struct bch_inode_unpacked *,
+ const struct qstr *);
+
+int bch2_rename_trans(struct btree_trans *,
+ u64, struct bch_inode_unpacked *,
+ u64, struct bch_inode_unpacked *,
+ struct bch_inode_unpacked *,
+ struct bch_inode_unpacked *,
+ const struct qstr *,
+ const struct qstr *,
+ enum bch_rename_mode);
+
+bool bch2_reinherit_attrs(struct bch_inode_unpacked *,
+ struct bch_inode_unpacked *);
+
+#endif /* _BCACHEFS_FS_COMMON_H */