Displaying 19 results from an estimated 19 matches for "create_subvol".
2011 Jun 28
0
[PATCH v2] Btrfs: fix error check of btrfs_lookup_dentry()
...--
V1 -> V2: unnecessary BUG_ON was deleted
fs/btrfs/ioctl.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index a3c4751..39c62d3 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -325,6 +325,7 @@ static noinline int create_subvol(struct btrfs_root *root,
struct btrfs_root *new_root;
struct dentry *parent = dget_parent(dentry);
struct inode *dir;
+ struct inode *inode;
int ret;
int err;
u64 objectid;
@@ -437,7 +438,14 @@ static noinline int create_subvol(struct btrfs_root *root,
BUG_ON(ret);
- d_instantiate...
2011 Jun 29
0
[PATCH v3] Btrfs: fix error check of btrfs_lookup_dentry()
...if (PTR_ERR(inode) == -ENOENT)
+ inode = NULL;
+ else
+ return ERR_CAST(inode);
+ }
return d_splice_alias(inode, dentry);
}
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index a3c4751..981084d 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -325,6 +325,7 @@ static noinline int create_subvol(struct btrfs_root *root,
struct btrfs_root *new_root;
struct dentry *parent = dget_parent(dentry);
struct inode *dir;
+ struct inode *inode;
int ret;
int err;
u64 objectid;
@@ -437,7 +438,13 @@ static noinline int create_subvol(struct btrfs_root *root,
BUG_ON(ret);
- d_instantiate...
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...l;
- ret = btrfs_insert_inode_ref(trans, root, name, namelen, objectid,
+ ret = btrfs_insert_inode_ref(trans, root, name, strlen(name),
+ objectid,
btrfs_root_dirid(&root->root_item));
if (ret)
goto fail;
@@ -981,8 +1012,7 @@ fail:
return ret;
}
-struct btrfs_root *create_subvol(struct btrfs_root *root,
- char *name, int namelen)
+struct btrfs_root *create_subvol(struct btrfs_root *root, const char *name)
{
int ret;
u64 objectid;
@@ -1017,12 +1047,13 @@ struct btrfs_root *create_subvol(struct
if (ret)
goto fail;
location.offset = (u64)-1;
- ret = btrfs_inse...
2013 Aug 27
7
[PATCH] Btrfs: fix deadlock in uuid scan kthread
...1716] [<ffffffffa0594c82>] btrfs_write_dirty_block_groups+0x562/0x650 [btrfs]
[36700.671723] [<ffffffffa0610092>] commit_cowonly_roots+0x171/0x24b [btrfs]
[36700.671729] [<ffffffffa05a4dde>] btrfs_commit_transaction+0x4fe/0xa10 [btrfs]
[36700.671735] [<ffffffffa0610af3>] create_subvol+0x5c0/0x636 [btrfs]
[36700.671742] [<ffffffffa05d49ff>] btrfs_mksubvol.isra.60+0x33f/0x3f0 [btrfs]
[36700.671747] [<ffffffffa05d4bf2>] btrfs_ioctl_snap_create_transid+0x142/0x190 [btrfs]
[36700.671752] [<ffffffffa05d4c6c>] ? btrfs_ioctl_snap_create+0x2c/0x80 [btrfs]
[36700.6717...
2013 Nov 27
0
[PATCH] Btrfs-progs: fix the mismatch of extent buffer's space
...1 +
extent_io.c | 2 +-
mkfs.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/btrfs-convert.c b/btrfs-convert.c
index ae10eed..cb6ddd0 100644
--- a/btrfs-convert.c
+++ b/btrfs-convert.c
@@ -1634,6 +1634,7 @@ static int init_btrfs(struct btrfs_root *root)
ret = create_subvol(trans, root, BTRFS_DATA_RELOC_TREE_OBJECTID);
BUG_ON(ret);
+ extent_buffer_get(fs_info->csum_root->node);
ret = __btrfs_cow_block(trans, fs_info->csum_root,
fs_info->csum_root->node, NULL, 0, &tmp, 0, 0);
BUG_ON(ret);
diff --git a/extent_io.c b/extent_io.c
index ad07...
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.
2013 Nov 15
7
Subvolume creation returns file exists
...some facts about this. Since we found that it''s the ioctl call
which returns EEXIST, the place to further track the problem down was
into the kernel module, which assumes that the userspace tools are not
generating the problem. Here is a high level traceback of the problem:
ioctl.c:create_subvol() returns -EEXIST
cgroup.c:btrfs_qgroup_inherit() returns -EEXIST
qgroup.c:add_qgroup_item() returns -EEXIST
ctree.c:btrfs_insert_empty_item() returns -EEXIST
ctree.c:btrfs_search_slot() returns 0
ctree.c:key_search() returns 0
The problem appeared before our current kerne...
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
...nsaction(root, 3);
if (IS_ERR(trans)) {
ret = PTR_ERR(trans);
+ btrfs_abort_transaction(root, ret);
break;
}
}
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index ac37040..10f446f 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -348,6 +348,7 @@ static noinline int create_subvol(struct btrfs_root *root,
trans = btrfs_start_transaction(root, 6);
if (IS_ERR(trans)) {
dput(parent);
+ btrfs_abort_transaction(root, PTR_ERR(trans));
return PTR_ERR(trans);
}
@@ -476,6 +477,7 @@ static int create_snapshot(struct btrfs_root *root, struct dentry *dentry,
trans = btr...
2013 Dec 13
2
[PATCH] Btrfs: fix error check of btrfs_lookup_dentry()
...NULL;
+ else
+ return ERR_CAST(inode);
+ }
+
+ return d_splice_alias(inode, dentry);
}
unsigned char btrfs_filetype_table[] = {
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 9d46f60..716779c 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -389,6 +389,7 @@ static noinline int create_subvol(struct inode *dir,
struct btrfs_root *new_root;
struct btrfs_block_rsv block_rsv;
struct timespec cur_time = CURRENT_TIME;
+ struct inode *inode;
int ret;
int err;
u64 objectid;
@@ -550,8 +551,14 @@ fail:
if (err && !ret)
ret = err;
- if (!ret)
- d_instantiate(dentry, bt...
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
2012 Aug 24
4
[PATCH] Btrfs: pass lockdep rwsem metadata to async commit transaction
The freeze rwsem is taken by sb_start_intwrite() and dropped during the
commit_ or end_transaction(). In the async case, that happens in a worker
thread. Tell lockdep the calling thread is releasing ownership of the
rwsem and the async thread is picking it up.
Josef and I worked out a more complicated solution that made the async
commit thread join and potentially get a later transaction, but
2013 Apr 30
13
WARNING: at fs/btrfs/free-space-cache.c:921 __btrfs_write_out_cache+0x6b9/0x9a0 [btrfs]()
Hello
On my HP Compaq dc5800 with Ubuntu 13.04 and their 3.8.0-19-lowlatency
kernel, I''ve got quite some kernel traces in the syslog. You can find
them below or at http://pastebin.com/bLXPBX67 (to avoid line breaks…).
These kernel traces all begin with:
WARNING: at fs/btrfs/free-space-cache.c:921
__btrfs_write_out_cache+0x6b9/0x9a0 [btrfs]()
Most of the time, it starts with:
Call
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...BTRFS_I(inode));
+ dump_stack();
+ }
btrfs_drop_extent_cache(inode, 0, (u64)-1);
kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode));
diff -r 99b12e2db0f8 ioctl.c
--- a/ioctl.c Wed Jun 18 20:50:41 2008 -0400
+++ b/ioctl.c Tue Jun 24 21:04:39 2008 -0400
@@ -128,7 +128,7 @@ static noinline int create_subvol(struct
dir = root->fs_info->sb->s_root->d_inode;
ret = btrfs_insert_dir_item(trans, root->fs_info->tree_root,
name, namelen, dir->i_ino, &key,
- BTRFS_FT_DIR);
+ BTRFS_FT_DIR, 0);
if (ret)
goto fail;
diff -r 99b12e2db0f8 super.c
--- a/super...
2012 Aug 01
17
[PATCH] add crtime to the snapshot list
From: Anand <anand.jain@oracle.com>
This patch adds creation-time to the snapshot list display,
which would help user to better manage the snapshots when
number of snapshots grow substantially. This patch is developed
and on top of the send/receive btrfs and btrfs-progs repo at
git://github.com/ablock84/linux-btrfs.git (send-v2)
git://github.com/ablock84/btrfs-progs.git (send-v2)
2011 May 11
8
[PATCH 1/4] Btrfs: map the node block when looking for readahead targets
If we have particularly full nodes, we could call btrfs_node_blockptr up to 32
times, which is 32 pairs of kmap/kunmap, which _sucks_. So go ahead and map the
extent buffer while we look for readahead targets. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
---
fs/btrfs/ctree.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git
2013 Oct 18
11
[GIT PULL] Btrfs
Hi Linus,
My for-linus branch has a one line fix:
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus
Sage hit a deadlock with ceph on btrfs, and Josef tracked it down to a
regression in our initial rc1 pull. When doing nocow writes we were
sometimes starting a transaction with locks held.
Josef Bacik (1) commits (+1/-0):
Btrfs: release path before starting
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...+203,7 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
BUG_ON(!trans);
ret = btrfs_update_inode(trans, root, inode);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
btrfs_update_iflags(inode);
inode->i_ctime = CURRENT_TIME;
@@ -318,7 +318,7 @@ static noinline int create_subvol(struct btrfs_root *root,
* insert the directory item
*/
ret = btrfs_set_inode_index(dir, &index);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
ret = btrfs_insert_dir_item(trans, root,
name, namelen, dir->i_ino, &key,
@@ -328,13 +328,13 @@ static noinline int create_su...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...root,
+ (int)(len / root->fs_info->max_extent));
+ if (IS_ERR(trans)) {
+ ret = PTR_ERR(trans);
goto out_free;
}
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 9f4db84..e7acdd5 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -240,12 +240,8 @@ static noinline int create_subvol(struct btrfs_root *root,
u64 index = 0;
unsigned long nr = 1;
- ret = btrfs_check_metadata_free_space(root);
- if (ret)
- goto fail_commit;
-
- trans = btrfs_start_transaction(root, 1);
- BUG_ON(!trans);
+ trans = btrfs_start_transaction(root, 4);
+ BUG_ON(IS_ERR(trans));
ret = btrfs_fin...
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