From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org, Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: dsterba@suse.cz
Subject: Re: [PATCH 1/1] Btrfs: consolidate btrfs_error() to btrfs_std_error()
Date: Fri, 02 Oct 2015 15:41:04 +0800 [thread overview]
Message-ID: <560E3510.1070403@oracle.com> (raw)
In-Reply-To: <20150925103128.GC11442@twin.jikos.cz>
On 09/25/2015 06:31 PM, David Sterba wrote:
> On Fri, Sep 25, 2015 at 02:43:01PM +0800, Anand Jain wrote:
>> btrfs_error() and btrfs_std_error() does the same thing
>> and calls _btrfs_std_error(), so consolidate them together.
>> And the main motivation is that btrfs_error() is closely
>> named with btrfs_err(), one handles error action the other
>> is to log the error, so don't closely name them.
>>
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>> Suggested-by: David Sterba <dsterba@suse.com>
>
> Reviewed-by: David Sterba <dsterba@suse.com>
>
> I guess we can live with the extra NULL argument, in some cases it does
> not make sense to put a string there.
>
>> --- a/fs/btrfs/ioctl.c
>> +++ b/fs/btrfs/ioctl.c
>> @@ -4852,7 +4852,7 @@ static long btrfs_ioctl_qgroup_assign(struct file *file, void __user *arg)
>> /* update qgroup status and info */
>> err = btrfs_run_qgroups(trans, root->fs_info);
>> if (err < 0)
>> - btrfs_error(root->fs_info, ret,
>> + btrfs_std_error(root->fs_info, ret,
>
> This looks like a bug, ret instead of err. The value of 'ret' is set by
> add/del qgroup relation which might fail if the relations are there, but
> we do not care. We're likely interested in the return code of
> btrfs_run_qgroups, ie. err. Can you please send a new patch on top of this?
I think the original code intended to log the error (btrfs_err())
instead of handle the error (btrfs_error()->btrfs_std_error()).
Qu, Any idea ?
Thanks, Anand
>> "failed to update qgroup status and info\n");
>> err = btrfs_end_transaction(trans, root);
>> if (err && !ret)
> --
> 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:[~2015-10-02 7:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 6:43 [PATCH 1/1] Btrfs: consolidate btrfs_error() to btrfs_std_error() Anand Jain
2015-09-25 10:31 ` David Sterba
2015-10-02 7:41 ` Anand Jain [this message]
2015-10-02 8:31 ` Qu Wenruo
2015-10-02 9:38 ` Anand Jain
2015-10-02 10:46 ` Anand Jain
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=560E3510.1070403@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.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 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.