From: Eric Sandeen <sandeen@redhat.com>
To: dsterba@suse.cz, Wang Shilong <wangshilong1991@gmail.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs-progs: fix parse_limit function to return errors when parsing unit
Date: Wed, 27 Feb 2013 09:58:46 -0600 [thread overview]
Message-ID: <512E2D36.4040307@redhat.com> (raw)
In-Reply-To: <20130227155255.GI27541@twin.jikos.cz>
On 2/27/13 9:52 AM, David Sterba wrote:
> On Thu, Feb 21, 2013 at 08:26:15PM +0800, Wang Shilong wrote:
>> From: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
>>
>> Steps to reproduce:
>> btrfs qgroup limit m <mnt>/subv
>>
>> Here, unit(k/K/g/G/m/M/t/T) all will trigger the problem.
>> For the above command, the original code will parse the limit value as 0
>> and return successfully.It is wrong,fix it.
>
> I don't think we should allow to accept bare units for specifing
> numbers, so in that case fail with 'unrecognized limit'.
I agree with that.
Maybe since David didn't quite want to take my patch 01/17, and Zach
thought we needed better code for it all, and Goffredo didn't like
the exit() from parse_size, and now this problem, we need a single,
concerted effort to fix up size parsing.
Who knew it was so hard? :)
-Eric
> david
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2013-02-27 15:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-21 12:26 [PATCH] Btrfs-progs: fix parse_limit function to return errors when parsing unit Wang Shilong
2013-02-27 15:52 ` David Sterba
2013-02-27 15:58 ` Eric Sandeen [this message]
2013-02-28 14:18 ` Shilong Wang
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=512E2D36.4040307@redhat.com \
--to=sandeen@redhat.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=wangshilong1991@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox