1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_FS_COMMON_H
3 #define _BCACHEFS_FS_COMMON_H
7 #define BCH_CREATE_TMPFILE (1U << 0)
8 #define BCH_CREATE_SUBVOL (1U << 1)
9 #define BCH_CREATE_SNAPSHOT (1U << 2)
10 #define BCH_CREATE_SNAPSHOT_RO (1U << 3)
12 int bch2_create_trans(struct btree_trans *, subvol_inum,
13 struct bch_inode_unpacked *,
14 struct bch_inode_unpacked *,
16 uid_t, gid_t, umode_t, dev_t,
19 subvol_inum, unsigned);
21 int bch2_link_trans(struct btree_trans *,
22 subvol_inum, struct bch_inode_unpacked *,
23 subvol_inum, struct bch_inode_unpacked *,
26 int bch2_unlink_trans(struct btree_trans *, subvol_inum,
27 struct bch_inode_unpacked *,
28 struct bch_inode_unpacked *,
29 const struct qstr *, bool);
31 int bch2_rename_trans(struct btree_trans *,
32 subvol_inum, struct bch_inode_unpacked *,
33 subvol_inum, struct bch_inode_unpacked *,
34 struct bch_inode_unpacked *,
35 struct bch_inode_unpacked *,
38 enum bch_rename_mode);
40 bool bch2_reinherit_attrs(struct bch_inode_unpacked *,
41 struct bch_inode_unpacked *);
43 #endif /* _BCACHEFS_FS_COMMON_H */