[PATCH v2.1 3/3] btrfs-progs: fsck-tests: Add test case for invalid root generation

2019-08-11 Thread Qu Wenruo
The image contains a fs tree whose generation is over 100 larger than super block generation. Signed-off-by: Qu Wenruo --- .../.lowmem_repairable | 0 .../041-invalid-root-generation/default_case.img | Bin 0 -> 3072 bytes 2 files changed, 0 insertions(+), 0 deletions

[PATCH v2.1 1/3] btrfs-progs: check/lowmem: Check and repair root generation

2019-08-11 Thread Qu Wenruo
Since kernel is going to reject any root item which is newer than super block generation, we need to provide a way to fix such problem in btrfs-check. This patch addes the ability to report and repair root generation in lowmem mode. This is done by cowing the root node, so we will update the root

[PATCH v2.1 0/3] btrfs-progs: Check and repair invalid root item generation

2019-08-11 Thread Qu Wenruo
Kernel is going to reject invalid root generation. Consider the existing checks are causing some error reports, we should handle such problem in advance, so that's the patchset is going to do, check and repair such invalid root generation. Changelog: v2: - Use existing recow_extent_buffer() to do

[PATCH v2.1 2/3] btrfs-progs: check/original: Check and repair root item geneartion

2019-08-11 Thread Qu Wenruo
Add such ability to original mode to fix root generation mismatch, which can be rejected by kernel. Signed-off-by: Qu Wenruo --- check/main.c | 21 + 1 file changed, 21 insertions(+) diff --git a/check/main.c b/check/main.c index 98b07fcb58c8..ae3ce13e9466 100644 --- a/check

[PATCH v2 3/3] btrfs-progs: fsck-tests: Add test case for invalid root generation

2019-08-11 Thread Qu Wenruo
The image contains a fs tree whose generation is over 100 larger than super block generation. Signed-off-by: Qu Wenruo --- .../041-invalid-root-generation/default_case.img | Bin 0 -> 3072 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/fsck-tests/041-invalid-roo

[PATCH v2 2/3] btrfs-progs: check/original: Check and repair root item geneartion

2019-08-11 Thread Qu Wenruo
Add such ability to original mode to fix root generation mismatch, which can be rejected by kernel. Signed-off-by: Qu Wenruo --- check/main.c | 21 + 1 file changed, 21 insertions(+) diff --git a/check/main.c b/check/main.c index 98b07fcb58c8..ae3ce13e9466 100644 --- a/check

[PATCH v2 1/3] btrfs-progs: check/lowmem: Check and repair root generation

2019-08-11 Thread Qu Wenruo
Since kernel is going to reject any root item which is newer than super block generation, we need to provide a way to fix such problem in btrfs-check. This patch addes the ability to report and repair root generation in lowmem mode. This is done by cowing the root node, so we will update the root

[PATCH v2 0/3] btrfs-progs: Check and repair invalid root item generation

2019-08-11 Thread Qu Wenruo
Kernel is going to reject invalid root generation. Consider the existing checks are causing some error reports, we should handle such problem in advance, so that's the patchset is going to do, check and repair such invalid root generation. Changelog: v2: - Use existing recow_extent_buffer() to do

Re: [PATCH 1/3] btrfs-progs: check/lowmem: Check and repair root generation

2019-08-11 Thread Qu Wenruo
On 2019/8/10 下午5:24, Qu Wenruo wrote: > > [...] >>> >>> Because we have extra transid check in >>> btrfs_search_slot()/btrfs_cow_block(). >>> >>> EXTENT_BAD_TRANSID is to suppress such warning. >> >> nod >> >>> So repair_root_generation could possibly be as simple as just linking

Re: many busy btrfs processes during heavy cpu and memory pressure

2019-08-11 Thread Qu Wenruo
On 2019/8/12 上午10:27, Chris Murphy wrote: > I'm not sure this is a bug, but I'm also not sure if the behavior is expected. > > Test system as follows: > > Intel i7-2820QM, 4/8 cores > 8 GiB RAM, 8 GiB swap on SSD plain partition > Samsung SSD 840 EVO 250GB > kernel 5.3.0-0.rc3.git0.1.fc31.x86_6

Re: WARNING: fs/btrfs/extent-tree.c:6974 __btrfs_free_extent.isra.0.cold

2019-08-11 Thread Qu Wenruo
On 2019/8/12 下午1:00, Chris Murphy wrote: > Filed bug here > https://bugzilla.kernel.org/show_bug.cgi?id=204557 Exactly the WARN_ON()/BUG_ON()s I'm going to kill in this patch: https://patchwork.kernel.org/patch/11038303/ So hopefully in 5.3/5.4 release, it will be a more developer-friendly out

Re: [bug] btrfs check clear-space-cache v1 corrupted file system

2019-08-11 Thread Chris Murphy
On Sun, Aug 11, 2019 at 10:54 PM Qu Wenruo wrote: > > > > On 2019/8/12 下午12:24, Chris Murphy wrote: > > On Sun, Mar 10, 2019 at 5:20 PM Chris Murphy > > wrote: > >> > >> On Sat, Mar 2, 2019 at 11:18 AM Chris Murphy > >> wrote: > >>> > >>> Sending URL for dump-tree output offlist. Conversation

WARNING: fs/btrfs/extent-tree.c:6974 __btrfs_free_extent.isra.0.cold

2019-08-11 Thread Chris Murphy
Filed bug here https://bugzilla.kernel.org/show_bug.cgi?id=204557 kernel 5.2.8 progs 5.2.1 I'm getting a kernel warning, and tainted kernel following 'btrfs scrub start' on a file system that was previously corrupted during failure to clear v1 cache. It's valid to complain about a problem with

Re: [bug] btrfs check clear-space-cache v1 corrupted file system

2019-08-11 Thread Qu Wenruo
On 2019/8/12 下午12:24, Chris Murphy wrote: > On Sun, Mar 10, 2019 at 5:20 PM Chris Murphy wrote: >> >> On Sat, Mar 2, 2019 at 11:18 AM Chris Murphy wrote: >>> >>> Sending URL for dump-tree output offlist. Conversation should still be >>> on-list. >> >> >> Any more information required from me a

Re: [bug] btrfs check clear-space-cache v1 corrupted file system

2019-08-11 Thread Chris Murphy
On Sun, Mar 10, 2019 at 5:20 PM Chris Murphy wrote: > > On Sat, Mar 2, 2019 at 11:18 AM Chris Murphy wrote: > > > > Sending URL for dump-tree output offlist. Conversation should still be > > on-list. > > > Any more information required from me at this point? This file system has been on a shelf

many busy btrfs processes during heavy cpu and memory pressure

2019-08-11 Thread Chris Murphy
I'm not sure this is a bug, but I'm also not sure if the behavior is expected. Test system as follows: Intel i7-2820QM, 4/8 cores 8 GiB RAM, 8 GiB swap on SSD plain partition Samsung SSD 840 EVO 250GB kernel 5.3.0-0.rc3.git0.1.fc31.x86_64+debug, but same behavior seen on 5.2.6 Test involves usin

Re: Mount failure with 5.2.7 but mounts with 5.1.4

2019-08-11 Thread Qu Wenruo
On 2019/8/12 上午12:23, Pete wrote: > On 8/11/19 1:13 AM, Qu Wenruo wrote: > > Qu, thank you. > >>> >>> [ 55.139154] BTRFS: device fsid 5128caf4-b518-4b65-ae46-b5505281e500 >>> devid 1 transid 66785 /dev/sda4 >>> [ 55.139623] BTRFS info (device sda4): disk space caching is enabled >>> [ 55.

Re: Mount failure with 5.2.7 but mounts with 5.1.4

2019-08-11 Thread Pete
On 8/11/19 1:13 AM, Qu Wenruo wrote: Qu, thank you. >> >> [ 55.139154] BTRFS: device fsid 5128caf4-b518-4b65-ae46-b5505281e500 >> devid 1 transid 66785 /dev/sda4 >> [ 55.139623] BTRFS info (device sda4): disk space caching is enabled >> [ 55.813959] BTRFS critical (device sda4): corrupt lea

Re: [PATCH 2/2] btrfs: compression: replace set_level callbacks by a common helper

2019-08-11 Thread kbuild test robot
-Sterba/Compression-level-API-cleanups/20190811-193645 config: x86_64-randconfig-h002-201932 (attached as .config) compiler: gcc-7 (Debian 7.4.0-10) 7.4.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 If you fix the issue, kindly add following tag Reported

Re: [PATCH 2/2] btrfs: compression: replace set_level callbacks by a common helper

2019-08-11 Thread kbuild test robot
-Sterba/Compression-level-API-cleanups/20190811-193645 config: x86_64-randconfig-h003-201932 (attached as .config) compiler: gcc-7 (Debian 7.4.0-10) 7.4.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 If you fix the issue, kindly add following tag Reported