search for: btrfs_ioctl_snap_destroy

Displaying 9 results from an estimated 9 matches for "btrfs_ioctl_snap_destroy".

2009 Nov 03
2
[PATCH]] Btrfs: fix destroy snapshot to get the right parent dentry
...ui Miguel Silva <rmfrfs@gmail.com> --- fs/btrfs/ioctl.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index cdbb054..fe6ac9a 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -741,7 +741,7 @@ out: static noinline int btrfs_ioctl_snap_destroy(struct file *file, void __user *arg) { - struct dentry *parent = fdentry(file); + struct dentry *parent = file->f_path.dentry->d_parent; struct dentry *dentry; struct inode *dir = parent->d_inode; struct inode *inode; @@ -793,9 +793,6 @@ static noinline int btrfs_ioctl_sn...
2010 Mar 22
5
[PATCH 0/5] asynchronous commit, snapshot ponies
Hi everyone, This patchset is the latest approach I''m using for the Ceph storage daemon to keep track of which data has safely committed to disk. The basic idea is to not use the (problematic) user transaction ioctls at all. Instead, the daemon quiesces its own write requests, initiates an async snapshot, and then continues. The snapshot approach is nice because it provides rollback.
2010 Oct 25
2
[PATCH] Btrfs: allow subvol deletion by unprivileged user with -o user_subvol_rm_allowed
...SDIR; + if (IS_DEADDIR(dir)) + return -ENOENT; + if (victim->d_flags & DCACHE_NFSFS_RENAMED) + return -EBUSY; + return 0; +} + /* copy of may_create in fs/namei.c() */ static inline int btrfs_may_create(struct inode *dir, struct dentry *child) { @@ -1288,9 +1358,6 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, int ret; int err = 0; - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - vol_args = memdup_user(arg, sizeof(*vol_args)); if (IS_ERR(vol_args)) return PTR_ERR(vol_args); @@ -1320,13 +1387,45 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, } in...
2013 Aug 30
3
[PATCH] btrfs: commit transaction after deleting a subvolume
...gned-off-by: David Sterba <dsterba@suse.cz> --- fs/btrfs/ioctl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index e407f75..4394632 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2268,7 +2268,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, out_end_trans: trans->block_rsv = NULL; trans->bytes_reserved = 0; - ret = btrfs_end_transaction(trans, root); + ret = btrfs_commit_transaction(trans, root); if (ret && !err) err = ret; inode->i_flags |= S_DEAD; -- 1.7.9 -- To unsubscribe from this...
2014 Apr 23
0
[PATCH 001/001] btrfs: Mechanism to modify the permission of a subvolume
...ong btrfs_ioctl(struct file *file, unsi return btrfs_ioctl_snap_create(file, argp, 1); case BTRFS_IOC_SUBVOL_CREATE_V2: return btrfs_ioctl_snap_create_v2(file, argp, 1); + case BTRFS_IOC_SUBVOL_MODIFY: + return btrfs_ioctl_subvol_modify(file, argp); case BTRFS_IOC_SNAP_DESTROY: return btrfs_ioctl_snap_destroy(file, argp); case BTRFS_IOC_SUBVOL_GETFLAGS: diff -rup linux-3.13.6/include/uapi/linux/btrfs.h linux-3.13.6_btrfs/include/uapi/linux/btrfs.h --- linux-3.13.6/include/uapi/linux/btrfs.h 2014-03-07 11:37:02.000000000 +0530 +++ linux-3.13.6_btrfs/include/uapi/linux/btrfs.h 2014-03-19 15:34:30.648255...
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
..., new_size); @@ -1430,6 +1433,7 @@ static noinline int btrfs_ioctl_subvol_setflags(struct file *file, trans = btrfs_start_transaction(root, 1); if (IS_ERR(trans)) { ret = PTR_ERR(trans); + btrfs_abort_transaction(root, ret); goto out_reset; } @@ -1898,6 +1902,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, trans = btrfs_start_transaction(root, 0); if (IS_ERR(trans)) { err = PTR_ERR(trans); + btrfs_abort_transaction(root, err); goto out_up_write; } trans->block_rsv = &root->fs_info->global_block_rsv; @@ -2316,6 +2321,7 @@ static noinline long btrfs_ioctl_...
2010 Oct 25
14
[PATCH 0/6] Btrfs commit fixes, async subvol operations
Hi Chris, This is the extent of my current queue of Btrfs snapshot/subvol/commit stuff. Most of these were posted several months ago. Can be sent upstream during this merge window? Not having this functionality is becoming a bit of a roadblock for our efforts to keep the Ceph data in a consistent state. These patches are also available from
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...dd(&pending_snapshot->list, &trans->transaction->pending_snapshots); ret = btrfs_commit_transaction(trans, root->fs_info->extent_root); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); ret = pending_snapshot->error; if (ret) @@ -1288,7 +1288,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, dest->root_key.objectid, dentry->d_name.name, dentry->d_name.len); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); btrfs_record_root_in_trans(trans, dest); @@ -1301,11 +1301,11 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, ret = b...
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible to limit subvolumes and any group of subvolumes and also to track the amount of space that will get freed when deleting snapshots. The current version is functionally incomplete, with the main missing feature being the initial scan and rescan of an existing filesystem. I put some effort into writing an introduction into