From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Cc: clm@fb.com
Subject: Re: [PATCH v2] btrfs-progs: add stat check in open_ctree_fs_info
Date: Fri, 18 Mar 2016 13:50:28 -0400 [thread overview]
Message-ID: <56EC3FE4.5090608@gmail.com> (raw)
In-Reply-To: <20160318151714.GA21722@twin.jikos.cz>
On 2016-03-18 11:17, David Sterba wrote:
> On Fri, Mar 18, 2016 at 10:03:42AM -0400, Austin S. Hemmelgarn wrote:
>> There are other tools that have similarly poor error behavior when
>> called incorrectly (btrfs rescue immediately comes to mind), but they
>> don't use open_ctree_fs_info, so this doesn't affect them. I may do
>> followup patches to fix those too if I have the time.
>
> Yeah, it would be good to fix all.
I had a bit of spare time over lunch, and decided to take a cursory
look. I hadn't realized that open_ctree uses open_ctree_fs_info, and it
looks like almost everything that doesn't call open_ctree_fs_info calls
open_ctree, which means this actually added error checking to a lot more
than I realized, possibly everything that expects a filesystem image to
operate on. I've checked btrfs rescue now, and with this change, it now
gives a nice error for something other than a a file or block device.
It looks like a follow up patch may not be necessary after all, I'll try
and double check the rest of the commands that I haven't checked already
over the weekend, and hopefully have something by Monday or Tuesday if
there's anything else that needs this check added.
prev parent reply other threads:[~2016-03-18 17:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 14:03 [PATCH v2] btrfs-progs: add stat check in open_ctree_fs_info Austin S. Hemmelgarn
2016-03-18 15:17 ` David Sterba
2016-03-18 15:29 ` Austin S. Hemmelgarn
2016-03-18 17:50 ` Austin S. Hemmelgarn [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=56EC3FE4.5090608@gmail.com \
--to=ahferroin7@gmail.com \
--cc=clm@fb.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).