search for: out_drop_write

Displaying 8 results from an estimated 8 matches for "out_drop_write".

Did you mean: mnt_drop_write
2014 Apr 23
0
[PATCH 001/001] btrfs: Mechanism to modify the permission of a subvolume
...= file_inode(file); + struct btrfs_root *root = BTRFS_I(inode)->root; + struct btrfs_trans_handle *trans; + u64 root_flags; + u64 flags; + int ret = 0; + + ret = mnt_want_write_file(file); + if (ret) + goto out; + + if (btrfs_ino(inode) != BTRFS_FIRST_FREE_OBJECTID) { + ret = -EINVAL; + goto out_drop_write; + } + vol_args = memdup_user(arg, sizeof(*vol_args)); + if (IS_ERR(vol_args)) + goto out_drop_write; + vol_args->name[BTRFS_SUBVOL_NAME_MAX] = '\0'; + flags = vol_args->flags; + if (!inode_owner_or_capable(inode)) { + ret = -EACCES; + goto out_drop_write; + } + + down_write(&r...
2010 Jul 01
0
[PATCH] btrfs: handle errors for FS_IOC_SETFLAGS
...rfs/ioctl.c index 4dbaf89..8db62c2 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -200,19 +200,26 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) trans = btrfs_join_transaction(root, 1); - BUG_ON(!trans); + if (IS_ERR(trans)) { + ret = PTR_ERR(trans); + goto out_drop_write; + } ret = btrfs_update_inode(trans, root, inode); - BUG_ON(ret); + if (ret) + goto out_endtrans; btrfs_update_iflags(inode); inode->i_ctime = CURRENT_TIME; - btrfs_end_transaction(trans, root); + ret = 0; +out_endtrans: + btrfs_end_transaction(trans, root); +out_drop_write: mnt_d...
2010 Jul 26
6
[PATCH] Btrfs: compressed file size ioctl
.../ioctl.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/ioctl.h | 1 + 2 files changed, 104 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9254b3d..d18401b 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1750,6 +1750,107 @@ out_drop_write: return ret; } +static long btrfs_ioctl_compsize(struct file *file, void __user *argp) +{ + /* This ioctl returns the compressed size of an inode on disk + * by counting the on-disk space used by all of its extents. + */ + struct inode *inode = fdentry(file)->d_inode; + struct btrfs_root...
2012 Mar 27
13
Create subvolume from a directory?
Hi all, Just a quick question but can''t find an obvious answer. Can I create/convert a existing (btrfs) directory into a subvolume? It would be very helpful when transferring ''partitions'' into btrfs. I found a similar question way back in google, but that site is down now generally. Thanks in advance. -- To unsubscribe from this list: send the line
2013 Aug 06
6
[PATCH 0/4] btrfs: out-of-band (aka offline) dedupe v4
Hi, The following series of patches implements in btrfs an ioctl to do out-of-band deduplication of file extents. To be clear, this means that the file system is mounted and running, but the dedupe is not done during file writes, but after the fact when some userspace software initiates a dedupe. The primary patch is loosely based off of one sent by Josef Bacik back in January, 2011.
2009 Nov 10
12
[RFC] big fat transaction ioctl
...et; + + ret = -EPERM; + if (!capable(CAP_SYS_ADMIN)) + goto out; + + ret = -EFAULT; + if (copy_from_user(&ut, orig_ut, sizeof(ut))) + goto out; + + ret = mnt_want_write(file->f_path.mnt); + if (ret) + goto out; + + ret = btrfs_reserve_metadata_space(root, 5*ut.num_ops); + if (ret) + goto out_drop_write; + + mutex_lock(&root->fs_info->trans_mutex); + root->fs_info->open_ioctl_trans++; + mutex_unlock(&root->fs_info->trans_mutex); + + ret = -ENOMEM; + trans = btrfs_start_ioctl_transaction(root, 0); + if (!trans) + goto out_drop; + + ret = do_usertrans(root, &ut, &o...
2012 Jun 20
8
[PATCH] Allow cross subvolume reflinks (2nd attempt)
Hello, This is the second attempt to bring in cross subvolume reflinks into btrfs. The first attempt was NAKed due to missing vfs mount checks and a clear description of what btrfs subvolumes are and probably also why cross subvolume reflinks are ok in the case of btrfs. This version of the patch comes from David and is in SUSE kernels since a long time, so it is tested and working. The patch
2009 May 03
6
[RFC] The reflink(2) system call.
Hi everyone, I described the reflink operation at the Linux Storage & Filesystems Workshop last month. Originally implemented as an ocfs2-specific ioctl, the consensus was that it should be a syscall from the get-go. Here's some first-cut patches. For people who have not seen reflink, either at LSF or on the ocfs2 wiki, the first patch contains Documentation/filesystems/reflink.txt to