search for: btrfs_free_dev_ext

Displaying 4 results from an estimated 4 matches for "btrfs_free_dev_ext".

2011 May 19
0
[PATCH] Btrfs: return error code to caller when btrfs_previous_item fails
...y: Tsutomu Itoh <t-itoh@jp.fujitsu.com> --- fs/btrfs/volumes.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 8b9fb8c..c95b214 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -983,14 +983,14 @@ static int btrfs_free_dev_extent(struct btrfs_trans_handle *trans, if (ret > 0) { ret = btrfs_previous_item(root, path, key.objectid, BTRFS_DEV_EXTENT_KEY); - BUG_ON(ret); + if (ret) + goto out; leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); extent = btrfs_...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...trans, wc.replay_dest, path); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } key.offset = found_key.offset - 1; diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index dd318ff..61b3440 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -879,7 +879,7 @@ static int btrfs_free_dev_extent(struct btrfs_trans_handle *trans, if (ret > 0) { ret = btrfs_previous_item(root, path, key.objectid, BTRFS_DEV_EXTENT_KEY); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); extent = bt...
2012 Dec 13
22
[PATCH] Btrfs: fix a deadlock on chunk mutex
An user reported that he has hit an annoying deadlock while playing with ceph based on btrfs. Current updating device tree requires space from METADATA chunk, so we -may- need to do a recursive chunk allocation when adding/updating dev extent, that is where the deadlock comes from. If we use SYSTEM metadata to update device tree, we can avoid the recursive stuff. Reported-by: Jim Schutt
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...int btrfs_relocate_chunk(struct btrfs_root *root, map = (struct map_lookup *)em->bdev; for (i = 0; i < map->num_stripes; i++) { + if (i > 0) { + /* 2 - 1 for the dev item plus the device item */ + ret = btrfs_extend_transaction(trans, root, 2); + BUG_ON(ret); + } ret = btrfs_free_dev_extent(trans, map->stripes[i].dev, map->stripes[i].physical); BUG_ON(ret); -- 1.5.4.3 -- 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/majordomo-i...