search for: __find_space_info

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

2010 Jun 10
0
[PATCH] [12/23] BTRFS: Clean up unused variables -- bugs
...================== --- linux-2.6.35-rc2-gcc.orig/fs/btrfs/extent-tree.c +++ linux-2.6.35-rc2-gcc/fs/btrfs/extent-tree.c @@ -3337,8 +3337,7 @@ struct btrfs_block_rsv *btrfs_alloc_bloc btrfs_init_block_rsv(block_rsv); alloc_target = btrfs_get_alloc_profile(root, 0); - block_rsv->space_info = __find_space_info(fs_info, - BTRFS_BLOCK_GROUP_METADATA); + block_rsv->space_info = __find_space_info(fs_info, alloc_target); return block_rsv; } Index: linux-2.6.35-rc2-gcc/fs/btrfs/dir-item.c =================================================================== --- linux-2.6.35-rc2-gcc.orig/fs/btrfs/d...
2009 Mar 20
1
[PATCH 2/4] Btrfs: clean up find_free_extent
...t loop = 0; - int extra_loop = 0; + int using_hint = 0; struct btrfs_space_info *space_info; WARN_ON(num_bytes < root->sectorsize); @@ -2567,6 +2563,8 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, ins->objectid = 0; ins->offset = 0; + space_info = __find_space_info(root->fs_info, data); + if (orig_root->ref_cows || empty_size) allowed_chunk_alloc = 1; @@ -2580,10 +2578,9 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, last_ptr = &root->fs_info->last_data_alloc; if (last_ptr) { - if (*last_ptr) { + if (...
2008 Oct 10
1
[PATCH] fix enospc when there is plenty of space
...ck_group(root->fs_info, last); - if (!cache) - goto out; - - *cache_ret = cache; - goto again; - -out: - return -ENOSPC; -} - -static u64 div_factor(u64 num, int factor) -{ - if (factor == 10) - return num; - num *= factor; - do_div(num, 10); - return num; -} - static struct btrfs_space_info *__find_space_info(struct btrfs_fs_info *info, u64 flags) { @@ -384,6 +331,15 @@ static struct btrfs_space_info *__find_space_info(struct btrfs_fs_info *info, return NULL; } +static u64 div_factor(u64 num, int factor) +{ + if (factor == 10) + return num; + num *= factor; + do_div(num, 10); + return nu...
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...ot->root_item); + spin_unlock(&fs_info->csum_root->accounting_lock); + + spin_lock(&fs_info->tree_root->accounting_lock); + num_bytes += btrfs_root_used(&fs_info->tree_root->root_item); + spin_unlock(&fs_info->tree_root->accounting_lock); +#endif + sinfo = __find_space_info(fs_info, BTRFS_BLOCK_GROUP_DATA); + spin_lock(&sinfo->lock); + data_used = sinfo->bytes_used; + spin_unlock(&sinfo->lock); + + sinfo = __find_space_info(fs_info, BTRFS_BLOCK_GROUP_METADATA); + spin_lock(&sinfo->lock); + meta_used = sinfo->bytes_used; + spin_unlock(&si...
2012 Mar 15
0
[PATCH] Btrfs: fix deadlock during allocating chunks
...* metadata for updating devices and chunk tree */ + return btrfs_calc_trans_metadata_size(root, num_dev + 1); +} + +static void check_system_chunk(struct btrfs_trans_handle *trans, + struct btrfs_root *root, u64 type) +{ + struct btrfs_space_info *info; + u64 left; + u64 thresh; + + info = __find_space_info(root->fs_info, BTRFS_BLOCK_GROUP_SYSTEM); + spin_lock(&info->lock); + left = info->total_bytes - info->bytes_used - info->bytes_pinned - + info->bytes_reserved - info->bytes_readonly; + spin_unlock(&info->lock); + + thresh = get_system_chunk_thresh(root, type); + if...
2012 Aug 14
2
Hung I/O, Kernel BUG with corrupt leaf (bad key order)
...ite_range+0x5b/0x60 [ 153.916315] [<ffffffff8110d61f>] filemap_fdatawrite+0x1f/0x30 [ 153.920013] [<ffffffff8110d665>] filemap_write_and_wait+0x35/0x60 [ 153.920013] [<ffffffffa01cf622>] __btrfs_write_out_cache+0x792/0x9a0 [btrfs] [ 153.920013] [<ffffffffa0175b25>] ? __find_space_info+0x85/0xa0 [btrfs] [ 153.920013] [<ffffffffa017f28b>] ? btrfs_run_delayed_refs+0x1cb/0x450 [btrfs] [ 153.920013] [<ffffffffa01cf8c5>] btrfs_write_out_cache+0x95/0xf0 [btrfs] [ 153.920013] [<ffffffffa017fa2f>] btrfs_write_dirty_block_groups+0x51f/0x5f0 [btrfs] [ 153.920013]...
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
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...rfs_fs_info *info = root->fs_info; struct btrfs_space_info *meta_sinfo; - u64 alloc_target, thresh; - int committed = 0, ret; + u64 alloc_target, thresh, used, total; /* get the space info for where the metadata will live */ alloc_target = btrfs_get_alloc_profile(root, 0); meta_sinfo = __find_space_info(info, alloc_target); -again: spin_lock(&meta_sinfo->lock); - if (!meta_sinfo->full) - thresh = meta_sinfo->total_bytes * 80; - else - thresh = meta_sinfo->total_bytes * 95; - - do_div(thresh, 100); + total = meta_sinfo->total_bytes; + used = meta_sinfo->bytes_used + meta...
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
2013 Aug 19
11
[RFC PATCH] Btrfs: fix memory leak of orphan block rsv
.../fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 32639f2..3ecee8e 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -4500,6 +4500,7 @@ struct btrfs_block_rsv *btrfs_alloc_block_rsv(struct btrfs_root *root, btrfs_init_block_rsv(block_rsv, type); block_rsv->space_info = __find_space_info(fs_info, BTRFS_BLOCK_GROUP_METADATA); + atomic_set(&block_rsv->count, 0); return block_rsv; } diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index b67b81a..459ffe2 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2870,8 +2870,13 @@ void btrfs_orphan_commit_root(struct...
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.