search for: btrfs_init_new_device

Displaying 7 results from an estimated 7 matches for "btrfs_init_new_device".

2008 Jun 30
0
[PATCH] Null terminate strings passed in from userspace
...me); - if (namelen > BTRFS_VOL_NAME_MAX) { - ret = -EINVAL; - goto out; - } if (strchr(vol_args->name, ''/'')) { ret = -EINVAL; goto out; @@ -480,6 +475,7 @@ ret = -EFAULT; goto out; } + vol_args->name[BTRFS_PATH_NAME_MAX] = ''\0''; ret = btrfs_init_new_device(root, vol_args->name); out: @@ -501,6 +497,7 @@ ret = -EFAULT; goto out; } + vol_args->name[BTRFS_PATH_NAME_MAX] = ''\0''; ret = btrfs_rm_device(root, vol_args->name); out: -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs"...
2009 Jan 19
4
[Patch] Btrfs: use BTRFS_VOL_NAME_MAX for struct btrfs_ioctl_vol_args
...;')) { ret = -EINVAL; @@ -685,7 +685,7 @@ static long btrfs_ioctl_add_dev(struct btrfs_root *root, void __user *arg) ret = -EFAULT; goto out; } - vol_args->name[BTRFS_PATH_NAME_MAX] = ''\0''; + vol_args->name[BTRFS_VOL_NAME_MAX] = ''\0''; ret = btrfs_init_new_device(root, vol_args->name); out: @@ -713,7 +713,7 @@ static long btrfs_ioctl_rm_dev(struct btrfs_root *root, void __user *arg) ret = -EFAULT; goto out; } - vol_args->name[BTRFS_PATH_NAME_MAX] = ''\0''; + vol_args->name[BTRFS_VOL_NAME_MAX] = ''\0''; r...
2012 Jan 11
12
[PATCH 00/11] Btrfs: some patches for 3.3
The biggest one is a fix for fstrim, and there''s a fix for on-disk free space cache. Others are small fixes and cleanups. The last three have been sent weeks ago. The patchset is also available in this repo: git://repo.or.cz/linux-btrfs-devel.git for-chris Note there''s a small confict with Al Viro''s vfs changes. Li Zefan (11): Btrfs: add pinned extents to
2011 Aug 23
40
[PATCH 00/21] [RFC] Btrfs: restriper
Hello, This patch series adds an initial implementation of restriper (it''s a clever name for relocation framework that allows to do selective profile changing and selective balancing with some goodies like pausing/resuming and reporting progress to the user. Profile changing is global (per-FS) so far, per-subvolume profiles require some discussion and can be implemented in future.
2011 Apr 20
4
[PATCH 1/5] Btrfs: fix bh leak on __btrfs_open_devices path
''bh'' is forgot to release if no error is detected Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> --- fs/btrfs/volumes.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 8b9fb8c..69fc902 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -631,6 +631,7 @@ static int
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...fs_trans_handle *trans, key.type = BTRFS_DEV_EXTENT_KEY; ret = btrfs_insert_empty_item(trans, root, path, &key, sizeof(*extent)); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); leaf = path->nodes[0]; extent = btrfs_item_ptr(leaf, path->slots[0], @@ -1509,7 +1509,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) if (seeding_dev) { sb->s_flags &= ~MS_RDONLY; ret = btrfs_prepare_sprout(trans, root); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } device->fs_devices = root->fs_info->fs_devices; @@ -1541,9 +1541,9 @@ int btrfs_init_new_d...
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
...@@ static int btrfs_rm_dev_item(struct btrfs_root *root, trans = btrfs_start_transaction(root, 0); if (IS_ERR(trans)) { btrfs_free_path(path); + btrfs_abort_transaction(root, PTR_ERR(trans)); return PTR_ERR(trans); } key.objectid = BTRFS_DEV_ITEMS_OBJECTID; @@ -1610,6 +1611,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) kfree(device->name); kfree(device); ret = PTR_ERR(trans); + btrfs_abort_transaction(root, ret); goto error; } @@ -2223,6 +2225,7 @@ again: trans = btrfs_start_transaction(root, 0); if (IS_ERR(trans)) { ret = PTR_ERR(trans); + b...