All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <dsterba@suse.cz>, <linux-btrfs@vger.kernel.org>, <lukas.lueg@gmail.com>
Subject: Re: [PATCH] btrfs-progs: Enhance read_tree_block to avoid memory corruption.
Date: Fri, 22 May 2015 08:34:09 +0800	[thread overview]
Message-ID: <555E7981.2060902@cn.fujitsu.com> (raw)
In-Reply-To: <20150521150421.GT23255@twin.jikos.cz>



-------- Original Message  --------
Subject: Re: [PATCH] btrfs-progs: Enhance read_tree_block to avoid 
memory corruption.
From: David Sterba <dsterba@suse.cz>
To: David Sterba <dsterba@suse.cz>
Date: 2015年05月21日 23:04

> On Thu, May 21, 2015 at 04:52:49PM +0200, David Sterba wrote:
>> The test 001-bad-file-extent-bytenr fails with this patch (and passes
>> otherwise). Can you please have a look?
>
> First check expectedly finds problems and fails, then repair is supposed
> to fix it, but the final check still finds problems because of the
> enhancements you've added:
>
> # output from the final check:
> checking extents
> invalid nr_items: 0
> Errors found in extent allocation tree or chunk allocation
> checking free space cache
> checking fs roots
> root 5 inode 257 errors 1000, some csum missing
> Checking filesystem on .../001-bad-file-extent-bytenr/default_case.img.restored
> UUID: 17442351-31aa-45fa-9503-90fd48874c3e
> cache and super generation don't match, space cache will be invalidated
> found 1081346 bytes used err is 1
> total csum bytes: 1024
> total tree bytes: 24576
> total fs tree bytes: 4096
> total extent tree bytes: 4096
> btree space waste bytes: 16507
> file data blocks allocated: 1310720
>   referenced 1310720
> btrfs-progs v4.0.1-2-gb7cf7c5c181d
> failed: .../btrfs check .../001-bad-file-extent-bytenr/default_case.img.restored
>
> It's "invalid nr_items: 0", while in the unpatched test there's
>
> Device extent[1, 29360128, 8388608] didn't find the relative chunk.
> Device extent[1, 1111490560, 1073741824] didn't find the relative chunk.
> Dev extent's total-byte(2185232384) is not equal to byte-used(1103101952) in dev[1, 216, 1]
>
Oh... I forgot the fact that empty tree is allowed to exist...
I'll update the patch soon.

Thanks
Qu

      reply	other threads:[~2015-05-22  0:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14  3:06 [PATCH] btrfs-progs: Enhance read_tree_block to avoid memory corruption Qu Wenruo
2015-05-21 14:52 ` David Sterba
2015-05-21 15:04   ` David Sterba
2015-05-22  0:34     ` Qu Wenruo [this message]

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=555E7981.2060902@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lukas.lueg@gmail.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.