From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <dsterba@suse.cz>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 0/6] btrfs-progs: New 'lost+found' infrastructrue with
Date: Wed, 26 Nov 2014 08:48:20 +0800 [thread overview]
Message-ID: <54752354.4010601@cn.fujitsu.com> (raw)
In-Reply-To: <20141125183215.GP26471@twin.jikos.cz>
-------- Original Message --------
Subject: Re: [PATCH 0/6] btrfs-progs: New 'lost+found' infrastructrue with
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Date: 2014年11月26日 02:32
> On Mon, Nov 24, 2014 at 05:06:59PM +0800, Qu Wenruo wrote:
>> Introduce the new 'lost+found' dir and related infrastructure to create it
>> in btrfs-progs.
>>
>> [BUG]
>> With the new infrastructure, fix a bug that some people reported in both
>> kernel BZ and maillist, which there is some files' nlink is 1 but backref
>> points to non-exist parent.
>> The two reporters all report missing file(chrome config file), so we'd
>> better not to delete such files but use the 'lost+found' dir.
> Well, I don't like introducing the lost+found directory.
>
> My idea is to extend the rescue utilities to extract the unlinked and
> copy them to a user defined directory and do not touch the filesystem.
Personally, also mentioned by others (maybe Chris?), I think btrfs
should only have two fsck facilities:
btrfsck for offline check and recovery, and scrub for online check and
recovery.
So rescue may finally be merged into btrfsck and extending rescue may
not be a good idea.
Also, such nlink mismatch is not such a huge bug destroying the whole fs
or making it unable to mount,
end users may not be happy with the fact they need to extra command
other than btrfsck to fix such
a small problem.
>
> Or, at least make the in-filesytem lost+found directory creation
> optional.
This seems better, but when user gives '--repair' option, they should be
aware of the fact that the fs
maybe modified by btrfsck.
Still your idea about optional creation of 'lost+found' dir is indeed
important for end users,
just like e2fsck's annoying but solid prompt.
What about try to prompt user that we are going to modify the fs and ask
for y/n ?
> You've split the patches well so I'm going to pull 1-5
> directly. Patch 6 should be updated a bit, I'll look closer and will let
> you know.
0004 and 0005 have some small fixes, I'll send the v2 patches soon.
Thanks,
Qu
>
>> 2. Unify the repair framework.
>> When writing the 6th patch, I think it is better to build a frame work
>> that unify the check and repair framework.
>> In 6th patch, my patchset and Josef's commit 2dc4c001 in fact has some
>> similar function but do the repair in different time and functions.
>>
>> I will try to build a unified framework for repair, each repair will be
>> independent and have its own err number.
>> And each repair function should work like the following:
>> 1) Check the error number
>> 2) Do the repair
>> 3) Update the related btrfsck record(like newly created inode, deleted inode)
> The unification is most welcome, feel free to send me anything that could be
> merged as preparatory work (cleanups, safe changes, etc).
prev parent reply other threads:[~2014-11-26 0:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-24 9:06 [PATCH 0/6] btrfs-progs: New 'lost+found' infrastructrue with Qu Wenruo
2014-11-24 9:07 ` [PATCH 1/6] btrfs-progs: print root dir verbose error in fsck Qu Wenruo
2014-11-24 9:07 ` [PATCH 2/6] btrfs-progs: Import btrfs_insert/del/lookup_extref() functions Qu Wenruo
2014-11-24 9:07 ` [PATCH 3/6] btrfs-progs: Import lookup/del_inode_ref() function Qu Wenruo
2014-11-24 9:07 ` [PATCH 4/6] btrfs-progs: Add btrfs_unlink() and btrfs_add_link() functions Qu Wenruo
2014-11-24 9:07 ` [PATCH 5/6] btrfs-progs: Add btrfs_mkdir() function for the incoming 'lost+found' fsck mechanism Qu Wenruo
2014-11-24 9:07 ` [PATCH 6/6] btrfs-progs: Add fixing function for inodes whose nlink dismatch Qu Wenruo
2014-11-25 18:32 ` [PATCH 0/6] btrfs-progs: New 'lost+found' infrastructrue with David Sterba
2014-11-26 0:48 ` 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=54752354.4010601@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=dsterba@suse.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).