All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Christoph Anton Mitterer <christoph.anton.mitterer@lmu.de>,
	Qu Wenruo <quwenruo@cn.fujitsu.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/9] Lowmem mode fsck fixes with fsck-tests framework update
Date: Sun, 29 Jan 2017 12:27:56 +0800	[thread overview]
Message-ID: <7125b67b-1b7e-c191-290d-cf60e63ee93e@gmx.com> (raw)
In-Reply-To: <1485473476.7613.12.camel@lmu.de>



On 01/27/2017 07:31 AM, Christoph Anton Mitterer wrote:
> On Thu, 2017-01-26 at 11:10 +0800, Qu Wenruo wrote:
>> Would you please try lowmem_tests branch of my repo?
>>
>> That branch contains a special debug output for the case you
>> encountered, which should help to debug the case.
>> pecial debug output for the case you encountered, which
>
> Here the output with your patches (again, not having applied the
> unnecessary fs-tests patches):
>
> In the output below I've replaced filenames with "[snip..snap]" and
> exchanged some of the xattr values.
> In case you should need their original values for testing, just tell me
> and I send them to you off-list.

Sorry for the late reply, in Chinese New Year vacation.

>
> btrfs-progs v4.9 WITH patches:
> ******************************
> # btrfs check --mode=lowmem /dev/nbd0 ; echo $?
> checking extents
> checking free space cache
> checking fs roots
> ERROR: root 6031 EXTENT_DATA[277 524288] datasum missing, have: 36864, expect: 45056 ret: 0

Thanks a lot for your debug output!

This shows the full reason of the problem! And it can be fixed easily now.
> Checking filesystem on /dev/nbd0
> UUID: 326d292d-f97b-43ca-b1e8-c722d3474719
> === fs tree leaf dump: slot: 136 ===
> leaf 5960902508544 items 191 free space 60 generation 2775 owner 6031
> fs uuid 326d292d-f97b-43ca-b1e8-c722d3474719
> chunk uuid 5da7e818-7f0b-43c1-b465-fdfaa52da633
<snipped>
> 	item 136 key (277 EXTENT_DATA 524288) itemoff 8443 itemsize 53
> 		generation 2775 type 1 (regular)
> 		extent data disk byte 6805694144512 nr 36864
> 		extent data offset 0 nr 45056 ram 45056
> 		extent compression 1 (zlib)

I just forgot that, we must handle plain extent and compressed extent 
separately.

For compressed case, we should not use extent offset and nr_bytes, but 
use the full extent.

I'll update the patchset soon to address it.

Thanks again for your detailed output and patience,
Qu

> === csum tree dump ===
> leaf 4983028940800 items 22 free space 6853 generation 3093 owner 7
> fs uuid 326d292d-f97b-43ca-b1e8-c722d3474719
> chunk uuid 5da7e818-7f0b-43c1-b465-fdfaa52da633
> 	item 0 key (EXTENT_CSUM EXTENT_CSUM 6805691457536) itemoff 16279 itemsize 4
> 		extent csum item
> 	item 1 key (EXTENT_CSUM EXTENT_CSUM 6805691461632) itemoff 16275 itemsize 4
> 		extent csum item
> 	item 2 key (EXTENT_CSUM EXTENT_CSUM 6805691465728) itemoff 16263 itemsize 12
> 		extent csum item
> 	item 3 key (EXTENT_CSUM EXTENT_CSUM 6805691478016) itemoff 16231 itemsize 32
> 		extent csum item
> 	item 4 key (EXTENT_CSUM EXTENT_CSUM 6805691510784) itemoff 16223 itemsize 8
> 		extent csum item
> 	item 5 key (EXTENT_CSUM EXTENT_CSUM 6805691518976) itemoff 16199 itemsize 24
> 		extent csum item
> 	item 6 key (EXTENT_CSUM EXTENT_CSUM 6805691543552) itemoff 16183 itemsize 16
> 		extent csum item
> 	item 7 key (EXTENT_CSUM EXTENT_CSUM 6805691559936) itemoff 15159 itemsize 1024
> 		extent csum item
> 	item 8 key (EXTENT_CSUM EXTENT_CSUM 6805692608512) itemoff 15151 itemsize 8
> 		extent csum item
> 	item 9 key (EXTENT_CSUM EXTENT_CSUM 6805692616704) itemoff 15055 itemsize 96
> 		extent csum item
> 	item 10 key (EXTENT_CSUM EXTENT_CSUM 6805692715008) itemoff 14903 itemsize 152
> 		extent csum item
> 	item 11 key (EXTENT_CSUM EXTENT_CSUM 6805693132800) itemoff 14519 itemsize 384
> 		extent csum item
> 	item 12 key (EXTENT_CSUM EXTENT_CSUM 6805693526016) itemoff 14391 itemsize 128
> 		extent csum item
> 	item 13 key (EXTENT_CSUM EXTENT_CSUM 6805693919232) itemoff 14135 itemsize 256
> 		extent csum item
> 	item 14 key (EXTENT_CSUM EXTENT_CSUM 6805694443520) itemoff 12727 itemsize 1408
> 		extent csum item
> 	item 15 key (EXTENT_CSUM EXTENT_CSUM 6805695885312) itemoff 11811 itemsize 916
> 		extent csum item
> 	item 16 key (EXTENT_CSUM EXTENT_CSUM 6805696823296) itemoff 11007 itemsize 804
> 		extent csum item
> 	item 17 key (EXTENT_CSUM EXTENT_CSUM 6805697646592) itemoff 10211 itemsize 796
> 		extent csum item
> 	item 18 key (EXTENT_CSUM EXTENT_CSUM 6805698461696) itemoff 9799 itemsize 412
> 		extent csum item
> 	item 19 key (EXTENT_CSUM EXTENT_CSUM 6805698883584) itemoff 9259 itemsize 540
> 		extent csum item
> 	item 20 key (EXTENT_CSUM EXTENT_CSUM 6805699436544) itemoff 8827 itemsize 432
> 		extent csum item
> 	item 21 key (EXTENT_CSUM EXTENT_CSUM 6805699878912) itemoff 7403 itemsize 1424
> 		extent csum item
> ERROR: errors found in fs roots
> found 7519512838144 bytes used, error(s) found
> total csum bytes: 7330834320
> total tree bytes: 10902437888
> total fs tree bytes: 2019704832
> total extent tree bytes: 1020149760
> btree space waste bytes: 925714197
> file data blocks allocated: 7509228494848
>  referenced 7630551511040
> 1
>
>
> Cheers,
> Chris.
>

  reply	other threads:[~2017-01-29  4:29 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23  9:13 [PATCH 0/9] Lowmem mode fsck fixes with fsck-tests framework update Qu Wenruo
2017-01-23  9:13 ` [PATCH 1/9] btrfs-progs: lowmem check: Fix wrong block group check when search slot points to slot beyong leaf Qu Wenruo
2017-01-23  9:13 ` [PATCH 2/9] btrfs-progs: fsck-test: Add test image for lowmem mode block group false alert Qu Wenruo
2017-01-23  9:13 ` [PATCH 3/9] btrfs-progs: fsck: Output verbose error when fsck found a bug Qu Wenruo
2017-01-23  9:13 ` [PATCH 4/9] btrfs-progs: lowmem check: Fix false alert in checking data extent pointing to prealloc extent Qu Wenruo
2017-01-23  9:13 ` [PATCH 5/9] btrfs-progs: lowmem check: Fix extent item size false alert Qu Wenruo
2017-01-23  9:13 ` [PATCH 6/9] btrfs-progs: tests: Move fsck-tests/015 to fuzz tests Qu Wenruo
2017-01-23  9:13 ` [PATCH 7/9] btrfs-progs: fsck-tests: Make 013 compatible with lowmem mode Qu Wenruo
2017-01-23  9:13 ` [PATCH 8/8] btrfs-progs: fsck: Fix lowmem mode override to allow it skip repair work Qu Wenruo
2017-01-23  9:13 ` [PATCH 8/9] btrfs-progs: fsck-tests: Add new test case for partly written prealloc extent Qu Wenruo
2017-01-23  9:13 ` [PATCH 9/9] btrfs-progs: fsck: Fix lowmem mode override to allow it skip repair work Qu Wenruo
2017-01-24 16:54 ` [PATCH 0/9] Lowmem mode fsck fixes with fsck-tests framework update Christoph Anton Mitterer
2017-01-25  0:44   ` Qu Wenruo
2017-01-25  0:46     ` Christoph Anton Mitterer
2017-01-25  4:16       ` Qu Wenruo
2017-01-25  4:40         ` Christoph Anton Mitterer
2017-01-26  2:50         ` Christoph Anton Mitterer
2017-01-26  3:10           ` Qu Wenruo
2017-01-26  3:30             ` Christoph Anton Mitterer
2017-01-26 23:31             ` Christoph Anton Mitterer
2017-01-29  4:27               ` Qu Wenruo [this message]
2017-01-30  3:07                 ` Christoph Anton Mitterer
2017-02-01  1:06                   ` Qu Wenruo
2017-02-01 22:03                     ` Christoph Anton Mitterer
2017-02-02  0:25                       ` Qu Wenruo
2017-02-02  2:12                         ` Qu Wenruo
     [not found]                           ` <1486098502.7443.3.camel@lmu.de>
2017-02-03  6:20                             ` Qu Wenruo
2017-02-03 23:01                               ` Christoph Anton Mitterer
2017-02-06  1:25                                 ` Qu Wenruo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7125b67b-1b7e-c191-290d-cf60e63ee93e@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=christoph.anton.mitterer@lmu.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.