From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <dsterba@suse.cz>, Filipe David Manana <fdmanana@gmail.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v4 00/13] btrfs-progs:fsck: Add inode nlink mismatch and
Date: Mon, 15 Dec 2014 11:54:31 +0800 [thread overview]
Message-ID: <548E5B77.7050000@cn.fujitsu.com> (raw)
In-Reply-To: <548E38A6.4030301@cn.fujitsu.com>
-------- Original Message --------
Subject: Re: [PATCH v4 00/13] btrfs-progs:fsck: Add inode nlink mismatch and
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: dsterba@suse.cz, Filipe David Manana <fdmanana@gmail.com>,
linux-btrfs@vger.kernel.org <linux-btrfs@vger.kernel.org>
Date: 2014年12月15日 09:25
> The binary image dump is definitely working, but the size still seems
> not so good.... :-(
>
> For my case, 64M contains my /etc copy even after xz with -9 option,
> the size is still about 2.8M. (although
> xz is already doing great job).
> I know there is even larger btrfs-image dump case here, but several
> megabytes size binary still seems
> not so good for me.
>
> But on the other hand, btrfs-image with -c9 dump the uncorrupted fs
> image to less than 200K.
> The point is that, I know exactly which leaf I can corrupt to produce
> the corrupted image and in fact,
> I am using my leaf corruption patch to do
> it(https://patchwork.kernel.org/patch/5170691/), even
> without the patch, I can still figure out where the leaf is and can
> use dd to corrupt the leaf.
>
> So why not change the test cases to following method?
> 1. Untar the tar.gz, which contains the corruption script + a
> btrfs-image dump.
> 2. Exec the corruption script to corrupt the image (Of course,
> btrfs-corrupte-image must be able to corrupt it)
> 3. Do the test.
>
> The trick may be step 2., which means every new repair function should
> have a corresponding corrupt function.
>
> The above is just a advice, I will still submit the binary image dump
> for now.
>
> Thanks,
> Qu
>
Oh, I'm terribly wrong about the
the 2M+ size binary xz image is a disaster for submitting a patch,
base64(?) encoded patch grows to
3.6M, I'd better use the btrfs-image dump + custom corrupting script method.
Thanks,
Qu
> -------- Original Message --------
> Subject: Re: [PATCH v4 00/13] btrfs-progs:fsck: Add inode nlink
> mismatch and
> From: David Sterba <dsterba@suse.cz>
> To: Filipe David Manana <fdmanana@gmail.com>
> Date: 2014年12月12日 23:31
>> On Fri, Dec 12, 2014 at 08:34:09AM +0000, Filipe David Manana wrote:
>>> Very simple solution.
>>>
>>> Do:
>>>
>>> 1) Create an empty file;
>>> 2) Use it as the backing file for a loop device;
>>> 3) Run mkfs.btrfs against the loop device;
>>> 4) Mount it;
>>> 5) Populate the fs;
>>> 6) Umount it;
>>> 7) Corrupt some nodes or leafs (by zeroing them out for e.g.);
>>> 8) Create a tarball from the backing file like this: ZX_OPT=-9 tar
>>> cJSvf foobar.tar.xz run.sh backing_file
>>> 9) Add the tarball to the fsck-tests directory;
>>> 10) Make the test run fsck against the backing file extracted from the
>>> tarball - fsck can operate against regular files, and not only against
>>> devices.
>> I made a few scripts that help to automate most of the steps (no
>> populating or fuzzing), attached.
>
prev parent reply other threads:[~2014-12-15 3:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-09 8:27 [PATCH v4 00/13] btrfs-progs:fsck: Add inode nlink mismatch and Qu Wenruo
2014-12-09 8:27 ` [PATCH v4 01/13] btrfs-progs: print root dir verbose error in fsck Qu Wenruo
2014-12-09 8:27 ` [PATCH v4 02/13] btrfs-progs: Import btrfs_insert/del/lookup_extref() functions Qu Wenruo
2014-12-09 8:27 ` [PATCH v4 03/13] btrfs-progs: Import lookup/del_inode_ref() function Qu Wenruo
2014-12-09 8:27 ` [PATCH v4 04/13] btrfs-progs: Add last_cache_extent() for extent-cache Qu Wenruo
2014-12-09 8:27 ` [PATCH v4 05/13] btrfs-progs: Record highest inode number before repair Qu Wenruo
2014-12-09 8:27 ` [PATCH v4 06/13] btrfs-progs: Add btrfs_unlink() and btrfs_add_link() functions Qu Wenruo
2014-12-09 8:27 ` [PATCH v4 07/13] btrfs-progs: Add btrfs_mkdir() function for the incoming 'lost+found' fsck mechanism Qu Wenruo
2014-12-09 8:27 ` [PATCH v4 08/13] btrfs-progs: Add count_digit() function to help calculate filename len Qu Wenruo
2014-12-10 12:45 ` David Sterba
2014-12-09 8:27 ` [PATCH v4 09/13] btrfs-progs: Add helper function find_file_name/type for nlink and inode_item repair Qu Wenruo
2014-12-09 8:27 ` [PATCH v4 10/13] btrfs-progs: Add fixing function for inodes whose nlink dismatch Qu Wenruo
2014-12-09 8:27 ` [PATCH v4 11/13] btrfs-progs: record and report leaf/node corruption in fs/subvol tree Qu Wenruo
2014-12-09 8:27 ` [PATCH v4 12/13] btrfs-progs: Recover btree by dropping corrupted leaf/node Qu Wenruo
2014-12-09 8:27 ` [PATCH v4 13/13] btrfs-progs: Add inode item rebuild function Qu Wenruo
2014-12-10 12:37 ` [PATCH v4 00/13] btrfs-progs:fsck: Add inode nlink mismatch and David Sterba
2014-12-11 0:50 ` Qu Wenruo
2014-12-11 11:07 ` Filipe David Manana
2014-12-12 0:32 ` Qu Wenruo
2014-12-12 8:34 ` Filipe David Manana
2014-12-12 8:53 ` Qu Wenruo
2014-12-12 15:31 ` David Sterba
2014-12-15 1:25 ` Qu Wenruo
2014-12-15 3:54 ` 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=548E5B77.7050000@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=dsterba@suse.cz \
--cc=fdmanana@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/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.