diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-03-17 06:28:43 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:13 +0300 |
commit | 42d237320e9817a94f3a0a2de28156523596b086 (patch) | |
tree | 23e492ebe4b8dc41afbf3fa3f1433534eccdfd4a /fs/bcachefs/fs-common.h | |
parent | a861c7225b9e31da745c262711d625782b5d766a (diff) | |
download | linux-42d237320e9817a94f3a0a2de28156523596b086.tar.xz |
bcachefs: Snapshot creation, deletion
This is the final patch in the patch series implementing snapshots.
This patch implements two new ioctls that work like creation and
deletion of directories, but fancier.
- BCH_IOCTL_SUBVOLUME_CREATE, for creating new subvolumes and snaphots
- BCH_IOCTL_SUBVOLUME_DESTROY, for deleting subvolumes and snapshots
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/fs-common.h')
-rw-r--r-- | fs/bcachefs/fs-common.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/bcachefs/fs-common.h b/fs/bcachefs/fs-common.h index 1bb2ac4dc13a..9bb0a9676147 100644 --- a/fs/bcachefs/fs-common.h +++ b/fs/bcachefs/fs-common.h @@ -5,6 +5,9 @@ struct posix_acl; #define BCH_CREATE_TMPFILE (1U << 0) +#define BCH_CREATE_SUBVOL (1U << 1) +#define BCH_CREATE_SNAPSHOT (1U << 2) +#define BCH_CREATE_SNAPSHOT_RO (1U << 3) int bch2_create_trans(struct btree_trans *, subvol_inum, struct bch_inode_unpacked *, @@ -13,7 +16,7 @@ int bch2_create_trans(struct btree_trans *, subvol_inum, uid_t, gid_t, umode_t, dev_t, struct posix_acl *, struct posix_acl *, - unsigned); + subvol_inum, unsigned); int bch2_link_trans(struct btree_trans *, subvol_inum, struct bch_inode_unpacked *, @@ -23,7 +26,7 @@ int bch2_link_trans(struct btree_trans *, int bch2_unlink_trans(struct btree_trans *, subvol_inum, struct bch_inode_unpacked *, struct bch_inode_unpacked *, - const struct qstr *); + const struct qstr *, int); int bch2_rename_trans(struct btree_trans *, subvol_inum, struct bch_inode_unpacked *, |