Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
btrfsprogs.356
0037-btrfs-progs-fsck-avoid-pinning-same-block-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0037-btrfs-progs-fsck-avoid-pinning-same-block-several-ti.patch of Package btrfsprogs.356
From 897c98de73627c10e9bf68798e98b3477dfc3bb0 Mon Sep 17 00:00:00 2001 From: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Date: Thu, 24 Apr 2014 11:19:17 +0800 Subject: [PATCH 037/303] btrfs-progs: fsck: avoid pinning same block several times This can not only give some speedups but also avoid forever loop with a really broken filesystem. Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz> --- cmds-check.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmds-check.c b/cmds-check.c index 23dbd0a03301..afdd044d4754 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -6121,6 +6121,15 @@ static int pin_down_tree_blocks(struct btrfs_fs_info *fs_info, int ret; int i; + /* + * If we have pinned this block before, don't pin it again. + * This can not only avoid forever loop with broken filesystem + * but also give us some speedups. + */ + if (test_range_bit(&fs_info->pinned_extents, eb->start, + eb->start + eb->len - 1, EXTENT_DIRTY, 0)) + return 0; + btrfs_pin_extent(fs_info, eb->start, eb->len); leafsize = btrfs_super_leafsize(fs_info->super_copy); -- 2.1.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor