search for: btrfs_drop_snapshot

Displaying 11 results from an estimated 11 matches for "btrfs_drop_snapshot".

2012 Apr 26
7
[PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount
The reason the deadlock is that: Task Btrfs-cleaner umount() down_write(&s->s_umount) sync_filesystem() do auto-defragment and produce lots of dirty pages close_ctree() wait for the end of btrfs-cleaner start_transaction reserve space shrink_delalloc() writeback_inodes_sb_nr_if_idle()
2007 Sep 23
0
[patch]fix get_bh and brelse issues when drop snapshot
...accordance with btrfs_defrag_leaves). The second change is decrease root->node's usage count when drop a snapshot. Regards YZ diff -r 29b8cc7794ac extent-tree.c --- a/extent-tree.c Thu Sep 20 14:14:42 2007 -0400 +++ b/extent-tree.c Sun Sep 23 12:35:00 2007 +0800 @@ -1483,6 +1483,7 @@ int btrfs_drop_snapshot(struct btrfs_tra level = btrfs_header_level(btrfs_buffer_header(root->node)); orig_level = level; if (btrfs_disk_key_objectid(&root_item->drop_progress) == 0) { + get_bh(root->node); path->nodes[level] = root->node; path->slots[level] = 0; } else { @@ -1516,7 +1...
2012 Sep 12
2
Deadlock in btrfs-cleaner, related to snapshot deletion
...] [ 386.318654] [<ffffffffa00dad76>] run_clustered_refs+0x136/0x3d0 [btrfs] [ 386.318685] [<ffffffffa00db100>] btrfs_run_delayed_refs+0xf0/0x2d0 [btrfs] [ 386.318721] [<ffffffffa00ecf99>] __btrfs_end_transaction+0xf9/0x3c0 [btrfs] [ 386.318753] [<ffffffffa00dcd35>] ? btrfs_drop_snapshot+0x545/0x600 [btrfs] [ 386.318789] [<ffffffffa00ed2b8>] btrfs_end_transaction_throttle+0x18/0x20 [btrfs] [ 386.318820] [<ffffffffa00dca03>] btrfs_drop_snapshot+0x213/0x600 [btrfs] [ 386.318857] [<ffffffffa00edae7>] btrfs_clean_old_snapshots+0xa7/0x150 [btrfs] [ 386.318890]...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...and subtract that from the maximum number of bytes allowed to be used in the transaction. This makes sure that if we start a transaction we can _always_ commit it. There are some gotcha''s related with this patch. Relocation seems to work for the most part, but you may hit problems with btrfs_drop_snapshots. The problem is not easy to hit, but its not terribly hard either. This will be fixed later by Yan, since he is already planning on re-working that code. This patch also turns off the metadata_ratio stuff in order to make sure users can get the most disk space as possible. We only force metada...
2011 Aug 15
9
[patch v2 0/9] btrfs: More error handling patches
...return void - Push up btrfs_pin_extent errors to callers - Push up non-looped btrfs_transaction_start errors to callers Changes since version 1: - Changed BUG_ON(ret) to BUG_ON(ret < 0) in set_extent_bit push up patch - Added missing chunk to set_extent_bit push up patch - Added handling for btrfs_drop_snapshot return values to btrfs_transaction_start patch <Tsutomu Itoh> -Jeff -- Jeff Mahoney SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordom...
2013 Jun 04
3
[PATCH] Btrfs: fix broken nocow after balance
Balance will create reloc_root for each fs root, and it''s going to record last_snapshot to filter shared blocks. The side effect of setting last_snapshot is to break nocow attributes of files. So it turns out that checking last_snapshot does not always ensure that a node/leaf/file_extent is shared. That''s why shared node/leaf needs to search extent tree for number of
2011 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all - Here''s my current error handling patchset, against 3.1-rc8. Almost all of this patchset is preparing for actual error handling. Before we start in on that work, I''m trying to reduce the surface we need to worry about. It turns out that there is a ton of code that returns an error code but never actually reports an error. The patchset has grown to 65 patches. 46 of them
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
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
..._handle *trans, ret = btrfs_dec_ref(trans, root, eb, 1); else ret = btrfs_dec_ref(trans, root, eb, 0); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } /* make block locked assertion in clean_tree_block happy */ if (!path->locks[level] && @@ -5941,7 +5941,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root, path->nodes[level]->len, &wc->refs[level], &wc->flags[level]); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); BUG_ON(wc->refs[level] == 0); if (level == root_item->drop_level) @@ -5991,7 +5991,7 @@ int btrfs_drop_sna...
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...duled for deletion */ -int btrfs_clean_old_snapshots(struct btrfs_root *root) +void btrfs_clean_old_snapshots(struct btrfs_root *root) { LIST_HEAD(list); struct btrfs_fs_info *fs_info = root->fs_info; @@ -1417,5 +1415,4 @@ int btrfs_clean_old_snapshots(struct btrfs_root *root) else btrfs_drop_snapshot(root, NULL, 1); } - return 0; } diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h index 02564e6..ea3813d 100644 --- a/fs/btrfs/transaction.h +++ b/fs/btrfs/transaction.h @@ -89,9 +89,9 @@ int btrfs_wait_for_commit(struct btrfs_root *root, u64 transid); int btrfs_write_and_wait_transa...
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...oot); - BUG_ON(ret); - write_ctree_super(trans, root); - btrfs_finish_extent_commit(trans, fs_info->extent_root, - &fs_info->pinned_extents); - btrfs_free_transaction(root, trans); - fs_info->running_transaction = NULL; - - trans = btrfs_start_transaction(root, 1); - ret = btrfs_drop_snapshot(trans, new_root); - BUG_ON(ret); - ret = btrfs_del_root(trans, fs_info->tree_root, &new_root->root_key); + &root->root_key, &root->root_item); BUG_ON(ret); commit_tree: ret = commit_tree_roots(trans, fs_info); @@ -418,10 +391,6 @@ commit_tree: free_extent_buffer(ro...