From: Eric Sandeen <sandeen@redhat.com>
To: dsterba@suse.cz, Filipe David Borba Manana <fdmanana@gmail.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>,
Chris Mason <chris.mason@fusionio.com>
Subject: Re: [PATCH 1/2] Btrfs-progs: remove duplicated code in cmds-restore.c
Date: Fri, 02 Aug 2013 19:34:13 -0500 [thread overview]
Message-ID: <51FC5005.20101@redhat.com> (raw)
In-Reply-To: <20130710161255.GD25386@twin.jikos.cz>
On 7/10/13 11:12 AM, David Sterba wrote:
> On Tue, Jul 09, 2013 at 07:49:53PM +0100, Filipe David Borba Manana wrote:
>> The module cmds-restore.c was defining its own next_leaf()
>> function, which did exactly the same as btrfs_next_leaf()
>> from ctree.c.
>
> This has been removed by Eric's patch present in the integration
> branches:
> Btrfs-progs: remove cut & paste btrfs_next_leaf from restore
> http://www.spinics.net/lists/linux-btrfs/msg24477.html
>
> but now Chris has a fix in the master branch,
> btrfs-restore: deal with NULL returns from read_node_slot
> https://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git/commit/?id=194aa4a1bd6447bb545286d0bcb0b0be8204d79f
Just noticed this. :(
Is there some reason that kernelspace should not also get Chris' fix, though?
> the code of updated next_leaf is not identical to btrfs_next_leaf and I
> think 'restore' could be more tolerant to partially corrupted
> structures, so both functions could make sense in the end.
Surely kernelspace should be at least as tolerant as userspace; it
it seems like Chris's BUG_ON removal patch could benefit kernelspace too, no?
And then we could take one more baby step towards a cleaner, non-
cut-and-pasted codebase.
-Eric
next prev parent reply other threads:[~2013-08-03 0:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 18:49 [PATCH 0/2] Remove duplicated and useless code in cmds-restore Filipe David Borba Manana
2013-07-09 18:49 ` [PATCH 1/2] Btrfs-progs: remove duplicated code in cmds-restore.c Filipe David Borba Manana
2013-07-10 16:12 ` David Sterba
2013-07-10 16:21 ` Filipe David Manana
2013-08-03 0:34 ` Eric Sandeen [this message]
2013-08-03 21:36 ` Eric Sandeen
2013-07-09 18:49 ` [PATCH 2/2] Btrfs-progs: remove unneeded leaf checks in cmds-restore Filipe David Borba Manana
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=51FC5005.20101@redhat.com \
--to=sandeen@redhat.com \
--cc=chris.mason@fusionio.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 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).