search for: btrfs_space_info

Displaying 20 results from an estimated 21 matches for "btrfs_space_info".

2010 Mar 12
2
[PATCH] Btrfs: force delalloc flushing when things get desperate
...rfs/extent-tree.c b/fs/btrfs/extent-tree.c index 0085dcb..aeef481 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2873,7 +2873,7 @@ static noinline void flush_delalloc_async(struct btrfs_work *work) kfree(async); } -static void wait_on_flush(struct btrfs_root *root, struct btrfs_space_info *info) +static void wait_on_flush(struct btrfs_root *root, struct btrfs_space_info *info, int soft) { DEFINE_WAIT(wait); u64 num_bytes; @@ -2895,6 +2895,12 @@ static void wait_on_flush(struct btrfs_root *root, struct btrfs_space_info *info break; } + if (!soft) { + spin_unlock(&amp...
2008 Oct 10
1
[PATCH] fix enospc when there is plenty of space
...nd seems better than holding the space_info spinlock over that entire search time. Thanks, Signed-off-by: Josef Bacik <jbacik@redhat.com> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 8559f39..fad58b9 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -508,6 +508,7 @@ struct btrfs_space_info { /* for block groups in our same type */ struct list_head block_groups; spinlock_t lock; + struct rw_semaphore groups_sem; }; struct btrfs_free_space { diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 280ac1a..ad648a3 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/e...
2012 Nov 19
4
btrfs crash - Null dereference - 3.7.0-rc5-00068-gc5e35d6
Hi, my system suddenly crashed and gave me this dump: http://imgur.com/oO6S0 I checked and there is not btrfs commit in linus'' tree since I compiled this kernel. Gustavo
2011 Jul 26
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations
...nt btrfs_prepare_extent_commit(struct btrfs_trans_handle *trans, struct btrfs_root *root); int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, @@ -2269,8 +2267,11 @@ void btrfs_put_block_group_cache(struct btrfs_fs_info *info); u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo); int btrfs_error_unpin_extent_range(struct btrfs_root *root, u64 start, u64 end); -int btrfs_error_discard_extent(struct btrfs_root *root, u64 bytenr, - u64 num_bytes, u64 *actual_bytes); +int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr, u64 num_bytes, + u6...
2011 Jul 27
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations V2
...nt btrfs_prepare_extent_commit(struct btrfs_trans_handle *trans, struct btrfs_root *root); int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, @@ -2269,8 +2267,11 @@ void btrfs_put_block_group_cache(struct btrfs_fs_info *info); u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo); int btrfs_error_unpin_extent_range(struct btrfs_root *root, u64 start, u64 end); -int btrfs_error_discard_extent(struct btrfs_root *root, u64 bytenr, - u64 num_bytes, u64 *actual_bytes); +int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr, u64 num_bytes, + u6...
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...for extent tree, checksum tree and root tree Signed-off-by: Yan Zheng <zheng.yan@oracle.com> --- diff -urp 8/fs/btrfs/ctree.h 9/fs/btrfs/ctree.h --- 8/fs/btrfs/ctree.h 2010-04-18 10:26:38.327697818 +0800 +++ 9/fs/btrfs/ctree.h 2010-04-18 10:30:01.883697869 +0800 @@ -682,21 +682,15 @@ struct btrfs_space_info { u64 bytes_reserved; /* total bytes the allocator has reserved for current allocations */ u64 bytes_readonly; /* total bytes that are read only */ - u64 bytes_super; /* total bytes reserved for the super blocks */ - u64 bytes_root; /* the number of bytes needed to commit a - tra...
2013 Mar 18
0
[PATCH] Btrfs-progs: fix memory leaks on cleanup
...o->free_space_cache); extent_io_tree_cleanup(&fs_info->block_group_cache); diff --git a/extent-tree.c b/extent-tree.c index eede633..ba47688 100644 --- a/extent-tree.c +++ b/extent-tree.c @@ -3172,10 +3172,12 @@ out: int btrfs_free_block_groups(struct btrfs_fs_info *info) { + struct btrfs_space_info *sinfo; u64 start; u64 end; u64 ptr; int ret; + while(1) { ret = find_first_extent_bit(&info->block_group_cache, 0, &start, &end, (unsigned int)-1); @@ -3195,6 +3197,13 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info) clear_extent_dirty(&info-&...
2010 Dec 12
0
[PATCH] Btrfs: pick the correct metadata allocation size on small devices
...ayama <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 @@ static int should_alloc_chunk(struct btrfs_root *root, struct btrfs_space_info *sinfo, u64 alloc_bytes) { u64 num_bytes = sinfo->total_bytes - sinfo->bytes_readonly; + u64 total_rw_bytes = root->fs_info->fs_devices->total_rw_bytes; + u64 max_chunk_size; u64 thresh; if (sinfo->bytes_used + sinfo->bytes_reserved + @@...
2012 Mar 15
0
[PATCH] Btrfs: fix deadlock during allocating chunks
...num_dev = 2; + else + num_dev = 1; /* DUP or single */ + + /* 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-&gt...
2009 Mar 20
1
[PATCH 2/4] Btrfs: clean up find_free_extent
...r = NULL; - u64 last_wanted = 0; struct btrfs_block_group_cache *block_group = NULL; - int chunk_alloc_done = 0; int empty_cluster = 2 * 1024 * 1024; int allowed_chunk_alloc = 0; - struct list_head *head = NULL, *cur = NULL; - int 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 || empt...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...+++++++++++++++---- fs/btrfs/transaction.h | 27 ++++- fs/btrfs/volumes.c | 17 ++- 11 files changed, 632 insertions(+), 187 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index db02e26..003400a 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -672,6 +672,7 @@ struct btrfs_space_info { u64 bytes_reserved; /* total bytes the allocator has reserved for current allocations */ u64 bytes_readonly; /* total bytes that are read only */ + u64 bytes_super; /* total bytes reserved for the super blocks */ /* delalloc accounting */ u64 bytes_delalloc; /* number of bytes r...
2011 Feb 09
1
warning in btrfs_free_block_groups
...pace_info has 1751910400 free, is not full space_info total=5377097728, used=3611955200, pinned=0, reserved=4843520, may_use=0, readonly=8388608 The code is: while(!list_empty(&info->space_info)) { space_info = list_entry(info->space_info.next, struct btrfs_space_info, list); if (space_info->bytes_pinned > 0 || space_info->bytes_reserved > 0) { WARN_ON(1); dump_space_info(space_info, 0, 0); } list_del(&space_info->list); kfree(space_info); } return...
2012 Jan 11
12
[PATCH 00/11] Btrfs: some patches for 3.3
The biggest one is a fix for fstrim, and there''s a fix for on-disk free space cache. Others are small fixes and cleanups. The last three have been sent weeks ago. The patchset is also available in this repo: git://repo.or.cz/linux-btrfs-devel.git for-chris Note there''s a small confict with Al Viro''s vfs changes. Li Zefan (11): Btrfs: add pinned extents to
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
...entry { + __le64 offset; + __le64 bytes; + u8 type; +} __attribute__ ((__packed__)); + struct btrfs_free_space_header { struct btrfs_disk_key location; __le64 generation; @@ -866,6 +876,7 @@ struct btrfs_block_group_cache { struct btrfs_key key; struct btrfs_block_group_item item; struct btrfs_space_info *space_info; + struct btrfs_free_space_ctl *free_space_ctl; u64 pinned; u64 flags; int cached; @@ -2055,6 +2066,9 @@ int btrfs_copy_pinned(struct btrfs_root *root, struct extent_io_tree *copy); struct btrfs_block_group_cache *btrfs_lookup_block_group(struct btrfs_fs_info *info,...
2011 Nov 09
12
WARNING: at fs/btrfs/inode.c:2198 btrfs_orphan_commit_root+0xa8/0xc0
Hello, I''m seeing a lot of warnings in dmesg with a BTRFS filesystem. I''m using the 3.1 kernel, I found a patch for these warnings ( http://marc.info/?l=linux-btrfs&m=131547325515336&w=2) <http://marc.info/?l=linux-btrfs&m=131547325515336&w=2>, but that patch has already been included in 3.1. Are there any other patches I can try? I''m using
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 29
4
[PATCH] Notify caching_thread()s to give up on extent_commit_sem when needed.
...g_ctl->count); list_add_tail(&caching_ctl->list, &fs_info->caching_block_groups); up_write(&fs_info->extent_commit_sem); @@ -5462,7 +5463,7 @@ void btrfs_prepare_extent_commit(struct btrfs_trans_handle *trans, struct btrfs_block_group_cache *cache; struct btrfs_space_info *space_info; - down_write(&fs_info->extent_commit_sem); + BTRFS_DOWN_WRITE_EXTENT_COMMIT_SEM(fs_info); list_for_each_entry_safe(caching_ctl, next, &fs_info->caching_block_groups, list) { @@ -8219,7 +8220,7 @@ int btrfs_free_block_groups(struct btrfs_fs_i...
2013 Aug 19
11
[RFC PATCH] Btrfs: fix memory leak of orphan block rsv
...| 36 +++++++++++++++++++++++++++++------- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 7c93d9f..da3ac13 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1153,6 +1153,7 @@ struct btrfs_block_rsv { u64 reserved; struct btrfs_space_info *space_info; spinlock_t lock; + atomic_t count; unsigned short full; unsigned short type; unsigned short failfast; diff --git a/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 @@ struc...
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.
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