search for: create_snapshot

Displaying 12 results from an estimated 12 matches for "create_snapshot".

2013 Mar 04
2
[PATCH 1/2] Btrfs: fix wrong handle at error path of create_snapshot() when the commit fails
There are several bugs at error path of create_snapshot() when the transaction commitment failed. - access the freed transaction handler. At the end of the transaction commitment, the transaction handler was freed, so we should not access it after the transaction commitment. - we were not aware of the error which happened during the snapshot creat...
2013 Dec 13
2
[PATCH] Btrfs: fix error check of btrfs_lookup_dentry()
Clean up btrfs_lookup_dentry() to never return NULL, but PTR_ERR(-ENOENT) instead. This keeps the return value convention consistent. Callers who use btrfs_lookup_dentry() require a trivial update. create_snapshot() in particular looks like it can also lose a BUG_ON(!inode) which is not really needed - there seems less harm in returning ENOENT to userspace at that point in the stack than there is to crash the machine. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> --- fs/btrfs/inode.c | 15 +++++...
2011 Jun 29
0
[PATCH v3] Btrfs: fix error check of btrfs_lookup_dentry()
...BUG_ON(ret); - d_instantiate(dentry, btrfs_lookup_dentry(dir, dentry)); + inode = btrfs_lookup_dentry(dir, dentry); + if (IS_ERR(inode)) { + ret = PTR_ERR(inode); + goto fail; + } + + d_instantiate(dentry, inode); fail: dput(parent); if (async_transid) { @@ -511,7 +518,6 @@ static int create_snapshot(struct btrfs_root *root, struct dentry *dentry, ret = PTR_ERR(inode); goto fail; } - BUG_ON(!inode); d_instantiate(dentry, inode); ret = 0; fail: -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org...
2013 Mar 04
0
[PATCH 2/2] Btrfs: fix unclosed transaction handler when the async transaction commitment fails
...@@ -527,6 +527,8 @@ fail: if (async_transid) { *async_transid = trans->transid; err = btrfs_commit_transaction_async(trans, root, 1); + if (err) + err = btrfs_commit_transaction(trans, root); } else { err = btrfs_commit_transaction(trans, root); } @@ -592,6 +594,8 @@ static int create_snapshot(struct btrfs_root *root, struct inode *dir, *async_transid = trans->transid; ret = btrfs_commit_transaction_async(trans, root->fs_info->extent_root, 1); + if (ret) + ret = btrfs_commit_transaction(trans, root); } else { ret = btrfs_commit_transaction(trans,...
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 Feb 11
1
How to take a (VMWare) Virtual Machine's Snapshot using Puppet
Hi, Here is the scenario: I am on an ubuntu 12.04 host, and want to be able to run a puppet script on another ubuntu 12.04 and Centos 6.3 host, which are VMWare VM''s and be able to: 1. Start / Stop The VM 2. Take a snap Shot 3. delete the VM 4. make a FRESH copy of a BASELINE VM, and start it up I only have ssh capability to the remote machines, but i can also run the ssh command
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
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
...+++ 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 = btrfs_start_transaction(root->fs_info->extent_root, 5); if (IS_ERR(trans)) { ret = PTR_ERR(trans); + btrfs_abort_transaction(root->fs_info->extent_root, ret); goto fail; } @@ -1242,6 +1244,7 @@ static noinline int bt...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...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_find_free_objectid(trans, root->fs_info->tree_root, 0, &objectid); @@ -376,10 +372,6 @@ static int create_snapshot(struct btrfs_root *root, struct dentry *dentry, if (!root->ref_cows) return -EINVAL; - ret = btrfs_check_metadata_free_space(root); - if (ret) - goto fail_unlock; - pending_snapshot = kzalloc(sizeof(*pending_snapshot), GFP_NOFS); if (!pending_snapshot) { ret = -ENOMEM; @@ -395,7 +...
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
2012 Feb 13
23
Set nodatacow per file?
Hello, is it possible to set nodatacow on a per-file basis? I couldn''t find anything. If not, wouldn''t that be a great feature to get around the performance issues with VM and database storage? Of course cloning should still cause COW. Thanks, Ralf-Peter -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...ret = btrfs_add_root_ref(trans, root->fs_info->tree_root, objectid, root->root_key.objectid, dir->i_ino, index, name, namelen); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); d_instantiate(dentry, btrfs_lookup_dentry(dir, dentry)); fail: @@ -369,12 +369,12 @@ static int create_snapshot(struct btrfs_root *root, struct dentry *dentry) } ret = btrfs_snap_reserve_metadata(trans, pending_snapshot); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); list_add(&pending_snapshot->list, &trans->transaction->pending_snapshots); ret = btrfs_commit_transaction(trans,...