Linux 6.13-rc4
[linux.git] / fs / bcachefs / fs-common.h
blobc934e807b380f3ca2d784a4d202f8ccf5e404263
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_FS_COMMON_H
3 #define _BCACHEFS_FS_COMMON_H
5 #include "dirent.h"
7 struct posix_acl;
9 #define BCH_CREATE_TMPFILE (1U << 0)
10 #define BCH_CREATE_SUBVOL (1U << 1)
11 #define BCH_CREATE_SNAPSHOT (1U << 2)
12 #define BCH_CREATE_SNAPSHOT_RO (1U << 3)
14 int bch2_create_trans(struct btree_trans *, subvol_inum,
15 struct bch_inode_unpacked *,
16 struct bch_inode_unpacked *,
17 const struct qstr *,
18 uid_t, gid_t, umode_t, dev_t,
19 struct posix_acl *,
20 struct posix_acl *,
21 subvol_inum, unsigned);
23 int bch2_link_trans(struct btree_trans *,
24 subvol_inum, struct bch_inode_unpacked *,
25 subvol_inum, struct bch_inode_unpacked *,
26 const struct qstr *);
28 int bch2_unlink_trans(struct btree_trans *, subvol_inum,
29 struct bch_inode_unpacked *,
30 struct bch_inode_unpacked *,
31 const struct qstr *, bool);
33 int bch2_rename_trans(struct btree_trans *,
34 subvol_inum, struct bch_inode_unpacked *,
35 subvol_inum, struct bch_inode_unpacked *,
36 struct bch_inode_unpacked *,
37 struct bch_inode_unpacked *,
38 const struct qstr *,
39 const struct qstr *,
40 enum bch_rename_mode);
42 bool bch2_reinherit_attrs(struct bch_inode_unpacked *,
43 struct bch_inode_unpacked *);
45 #endif /* _BCACHEFS_FS_COMMON_H */