This patch does the following refactor:
- Refactor parameter from @root to @fs_info
- Refactor the large loop body into another function
Now we have a helper function, read_one_block_group(), to handle
block group cache and space info related routine.
- Refactor the return value
Even we hav
Add a new option '-b' for btrfstune, to enable bg-tree feature for a
unmounted fs.
This feature will convert all BLOCK_GROUP_ITEMs in extent tree to bg
tree, by reusing the existing btrfs_convert_to_bg_tree() function.
Signed-off-by: Qu Wenruo
---
Documentation/btrfstune.asciidoc | 6 +
bt
Allow btrfs-progs to open, read and write 'bg_tree' enabled fs.
The modification itself is not large, as block groups items are only
used at 4 timing:
1) open_ctree()
We only need to populate fs_info->bg_root and read block group items
from fs_info->bg_root.
The obvious change is, we don'
This allow mkfs.btrfs to create a btrfs with bg-tree feature.
This patch introduce a global function, btrfs_convert_to_bg_tree() in
extent-tree.c, to do the work.
The workflow is pretty simple:
- Create a new tree block for bg tree
- Set the BG_TREE feature for superblock
- Set the fs_info->conve
The following functions are just using @root to reach fs_info:
- exclude_super_stripes
- free_excluded_extents
- add_excluded_extent
Refactor them to use fs_info directly.
Signed-off-by: Qu Wenruo
Reviewed-by: Johannes Thumshirn
---
check/main.c | 4 ++--
ctree.h | 4 ++--
extent-tree
Just a new tree called BLOCK_GROUP_TREE.
Signed-off-by: Qu Wenruo
---
cmds/inspect-dump-super.c | 3 ++-
cmds/inspect-dump-tree.c | 5 +
print-tree.c | 3 +++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/cmds/inspect-dump-super.c b/cmds/inspect-dump-super.c
in
Just some minor modification.
- original mode:
* Block group item can occur in extent tree and bg tree.
- lowmem mode:
* search block group items in bg tree if BG_TREE feature is set.
Signed-off-by: Qu Wenruo
---
check/main.c| 3 ++-
check/mode-lowmem.c | 9 +++--
2 files change
This patchset can be fetched from github:
https://github.com/adam900710/btrfs-progs/tree/bg_tree
Which is based on v5.2.2 tag.
This patchset provides the needed user space infrastructure for BG_TREE
feature.
Since it's an new incompatible feature, unlike SKINNY_METADATA, btrfs-progs
is needed to
[BUG]
When certain older mkfs.btrfs is used, btrfs/157 and btrfs/158 fails like
below:
btrfs/157 2s ... - output mismatch (see
xfstests-dev/results//btrfs/157.out.bad)
--- tests/btrfs/157.out 2019-07-22 14:13:44.65326 +0800
+++ results//btrfs/157.out.bad 2019-10-10 13:5
On Thu, Oct 10, 2019 at 10:39:28AM +0800, Qu Wenruo wrote:
diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h
index b65c7ee75bc7..1d1e50c42d0e 100644
--- a/include/uapi/linux/btrfs_tree.h
+++ b/include/uapi/linux/btrfs_tree.h
@@ -48,6 +48,9 @@
/* tracks free space in b
On 10/10/19 10:39 AM, Qu Wenruo wrote:
In btrfs_read_block_groups(), if we have an invalid block group which
has mixed type (DATA|METADATA) while the fs doesn't have MIX_BGS
feature, we error out without freeing the block group cache.
This patch will add the missing btrfs_put_block_group() to pr
On 10/10/19 10:39 AM, Qu Wenruo wrote:
Refactor the work inside the loop of btrfs_read_block_groups() into one
separate function, read_one_block_group().
This allows read_one_block_group to be reused for later BG_TREE feature.
The refactor does the following extra fix:
- Use btrfs_fs_incompat()
On 2019/10/10 上午10:39, Qu Wenruo wrote:
> This patchset can be fetched from:
> https://github.com/adam900710/linux/tree/bg_tree
> Which is based on v5.4-rc1 tag.
>
> This patchset will hugely reduce mount time of large fs by putting all
> block group items into its own tree.
>
> The old behavio
On 2019/10/10 上午10:39, Anand Jain wrote:
> We don't need int argument bool shall do in free_root_pointers().
> And rename the argument as it confused two people.
Victim here. :)
Although it's mostly caused by my stupidness. :(
>
> Signed-off-by: Anand Jain
Reviewed-by: Qu Wenruo
Thanks,
Qu
The overall idea of the new BG_TREE is pretty simple:
Put BLOCK_GROUP_ITEMS into a separate tree.
This brings one obvious enhancement:
- Reduce mount time of large fs
Although it could be possible to accept BLOCK_GROUP_ITEMS in either
trees (extent root or bg root), I'll leave that kernel convert
Refactor the work inside the loop of btrfs_read_block_groups() into one
separate function, read_one_block_group().
This allows read_one_block_group to be reused for later BG_TREE feature.
The refactor does the following extra fix:
- Use btrfs_fs_incompat() to replace open-coded feature check
Sig
This patchset can be fetched from:
https://github.com/adam900710/linux/tree/bg_tree
Which is based on v5.4-rc1 tag.
This patchset will hugely reduce mount time of large fs by putting all
block group items into its own tree.
The old behavior will try to read out all block group items at mount
time
In btrfs_read_block_groups(), if we have an invalid block group which
has mixed type (DATA|METADATA) while the fs doesn't have MIX_BGS
feature, we error out without freeing the block group cache.
This patch will add the missing btrfs_put_block_group() to prevent
memory leak.
Fixes: 49303381f19a (
We don't need int argument bool shall do in free_root_pointers().
And rename the argument as it confused two people.
Signed-off-by: Anand Jain
---
fs/btrfs/disk-io.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index f314f
On 2019/10/10 上午10:00, Anand Jain wrote:
> On 8/10/19 12:49 PM, Qu Wenruo wrote:
>> In free_root_pointers(), free_root_extent_buffers() has checked if the
>> @root parameter is NULL.
>> So there is no need checking chunk_root before freeing it.
>
> um..
Oh, my bad, I get confused with the param
On 8/10/19 12:49 PM, Qu Wenruo wrote:
In free_root_pointers(), free_root_extent_buffers() has checked if the
@root parameter is NULL.
So there is no need checking chunk_root before freeing it.
um..
Signed-off-by: Qu Wenruo
---
fs/btrfs/disk-io.c | 3 +--
1 file changed, 1 insertion(+), 2
On 6/20/18 4:56 PM, Chris Mason wrote:
For COW, btrfs expects pages dirty pages to have been through a few setup
steps. This includes reserving space for the new block allocations and marking
the range in the state tree for delayed allocation.
A few places outside btrfs will dirty pages directl
From: Filipe Manana
When doing a buffered write it's possible to leave the subv_writers
counter of the root, used for synchronization between buffered nocow
writers and snapshotting. This happens in an exceptional case like the
following:
1) We fail to allocate data space for the write, since th
From: Filipe Manana
In the fixup worker, if we fail to mark the range as delalloc in the io
tree, we must release the previously reserved metadata, as well as update
the outstanding extents counter for the inode, otherwise we leak metadata
space.
In pratice we can't return an error from btrfs_se
From: Filipe Manana
If we error out when finding a page at relocate_file_extent_cluster(), we
need to release the outstanding extents counter on the relocation inode,
set by the previous call to btrfs_delalloc_reserve_metadata(), otherwise
the inode's block reserve size can never decrease to zero
Sehr geehrte Damen und Herren
eyecamera.de Domain Name ist jetzt verfügbar und ist jetzt zu verkaufen.
Ich freue mich auf Ihre Antwort!
Es grüßt herzlich
Matthias Jung
___
On Wed, Oct 9, 2019 at 2:09 PM Qu Wenruo wrote:
>
> Refactor the work inside the loop of btrfs_read_block_groups() into one
> separate function, read_one_block_group().
>
> This allows read_one_block_group to be reused for later BG_TREE feature.
>
> The refactor does the following extra fixes:
> -
Refactor the work inside the loop of btrfs_read_block_groups() into one
separate function, read_one_block_group().
This allows read_one_block_group to be reused for later BG_TREE feature.
The refactor does the following extra fixes:
- Use btrfs_fs_incompat() to replace open-coded feature check
-
On 2019/10/9 下午8:08, Anand Jain wrote:
> On 10/8/19 12:49 PM, Qu Wenruo wrote:
>> Refactor the work inside the loop of btrfs_read_block_groups() into one
>> separate function, read_one_block_group().
>>
>> This allows read_one_block_group to be reused for later BG_TREE feature.
>>
>> Signed-off-b
On 10/8/19 12:49 PM, Qu Wenruo wrote:
Refactor the work inside the loop of btrfs_read_block_groups() into one
separate function, read_one_block_group().
This allows read_one_block_group to be reused for later BG_TREE feature.
Signed-off-by: Qu Wenruo
Nit: Change log didn't mention about thin
On 2019/10/9 下午4:08, Felix Niederwanger wrote:
> Hi Qu,
>
> I'm afraid the system is now in a very different configuration and
> already in production, which makes it impossible to run specific tests
> on it.
>
> At the time the problem occurred, we were using about 57/82 TB filled
> with appro
On 7.10.19 г. 22:37 ч., David Sterba wrote:
> To remove use of extent_map::bdev we need to find a replacement, and the
> latest_bdev is the only one we can use here, because inode::i_bdev and
> superblock::s_bdev are NULL.
>
> The only thing that DIO code uses from the bdev is the blocksize to
Hi Qu,
I'm afraid the system is now in a very different configuration and
already in production, which makes it impossible to run specific tests
on it.
At the time the problem occurred, we were using about 57/82 TB filled
with approx 20-30 million individual files with varying file sized. I
creat
On 2019/10/9 下午3:07, Felix Niederwanger wrote:
> Hey Johannes,
>
> glad to hear back from you :-)
>
> As discussed I try to elaborate the setup where we experienced the
> issue, that btrfs mount takes more than 5 minutes. The initial bug
> report is at https://bugzilla.opensuse.org/show_bug.cgi
On 10/8/19 7:35 PM, Johannes Thumshirn wrote:
On 08/10/2019 13:28, David Sterba wrote:
The helper is trivial and we can understand what the atomic_inc on
something named refs does.
Signed-off-by: David Sterba
---
quiz: find where and how is the refs are decremented
free_extent_buffer(), fr
35 matches
Mail list logo