Displaying 4 results from an estimated 4 matches for "should_alloc_chunk".
2010 Dec 12
0
[PATCH] Btrfs: pick the correct metadata allocation size on small devices
Josef''s fs_mark test
fs_mark -d /mnt/btrfs-test -D 512 -t 16 -n 4096 -F -S0
on a 2GB single metadata fs leaves about 400Mb of metadata almost unused.
This patch reduces metadata chunk allocations by considering the proper
metadata chunk size of 200MB in should_alloc_chunk(), not the default 256MB
which is set in __btrfs_alloc_chunk().
Signed-off-by: Itaru Kitayama <kitayama@cl.bb4.ne.jp>
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 8c26441..54ab490 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3241,6 +3241,8 @@ s...
2011 Jul 27
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations V2
...vation we drop bytes_may_use and add to
bytes_reserved. We didn''t use to do this because delalloc would update
bytes_may_use when it cleared delalloc. So now we don''t do this, we only will
update bytes_may_use if we have an error and have to clear the accounting
manually.
2) In should_alloc_chunk() we need to take into account the global_rsv size
since that is basically used space. This will make sure we do actually alloc
chunks. This logic needs to be reworked anyway, but since this is all very
touchy I''ll leave that for a different patch.
This passes Arne''s enospc tes...
2011 Jul 26
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations
...vation we drop bytes_may_use and add to
bytes_reserved. We didn''t use to do this because delalloc would update
bytes_may_use when it cleared delalloc. So now we don''t do this, we only will
update bytes_may_use if we have an error and have to clear the accounting
manually.
2) In should_alloc_chunk() we need to take into account the global_rsv size
since that is basically used space. This will make sure we do actually alloc
chunks. This logic needs to be reworked anyway, but since this is all very
touchy I''ll leave that for a different patch.
This passes Arne''s enospc tes...
2012 Mar 15
0
[PATCH] Btrfs: fix deadlock during allocating chunks
...t-tree.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 37e0a80..3bd5410 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3396,6 +3396,50 @@ static int should_alloc_chunk(struct btrfs_root *root,
return 1;
}
+static u64 get_system_chunk_thresh(struct btrfs_root *root, u64 type)
+{
+ u64 num_dev;
+
+ if (type & BTRFS_BLOCK_GROUP_RAID10 ||
+ type & BTRFS_BLOCK_GROUP_RAID0)
+ num_dev = root->fs_info->fs_devices->rw_devices;
+ else if (type &a...