linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Su Yue <Damenly_Su@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/3] btrfs-progs: Create uuid tree with proper contents
Date: Thu, 3 Jan 2019 07:46:24 +0800	[thread overview]
Message-ID: <fdc556bd-3134-f29e-b533-933bc6c7a2ed@gmx.com> (raw)
In-Reply-To: <20190102163128.GY23615@twin.jikos.cz>



On 2019/1/3 12:31 AM, David Sterba wrote:
> On Thu, Dec 27, 2018 at 07:28:40PM +0800, Su Yue wrote:
>>> +}
>>> +
>>> +int create_uuid_tree(struct btrfs_trans_handle *trans)
>>> +{
>>> +	struct btrfs_fs_info *fs_info = trans->fs_info;
>>> +	struct btrfs_root *uuid_root = fs_info->uuid_root;
>>> +	struct btrfs_key key;
>>> +	int ret;
>>> +
>>> +	if (!uuid_root) {
>>> +		ret = create_empty_tree(trans, BTRFS_UUID_TREE_OBJECTID);
>>> +		if (ret < 0) {
>>> +			errno = -ret;
>>> +			error("failed to create uuid root: %m");
>>
>> In personal taste, I don't like such assignment.
>> Let the community say.
> 
> Check eg. 251d32ea5cd1cf74cb52, replaces strerror(errno) with %m and
> requires no change. As we're using strerror(-ret) in many places, it's a
> followup that needs the extra errno assignment. This is IMO a small cost
> on the source code size and the gain in space savings might be
> noticeable for embedded devices, but we need to do all the conversions.
> 

Got it, Thanks.

  reply	other threads:[~2019-01-02 23:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-27  7:13 [PATCH for-4.20 0/3] Fix incorrectly created uuid tree Qu Wenruo
2018-12-27  7:13 ` [PATCH 1/3] btrfs-progs: uuid: Port kernel btrfs_uuid_tree_lookup() Qu Wenruo
2018-12-27  7:37   ` Su Yue
2018-12-27  7:31     ` Qu Wenruo
2018-12-27  7:13 ` [PATCH 2/3] btrfs-progs: uuid: Port btrfs_uuid_tree_add() function Qu Wenruo
2018-12-27  7:54   ` Su Yue
2018-12-27  7:13 ` [PATCH 3/3] btrfs-progs: Create uuid tree with proper contents Qu Wenruo
2018-12-27 11:28   ` Su Yue
2018-12-27 11:32     ` Qu Wenruo
2019-01-02 16:31     ` David Sterba
2019-01-02 23:46       ` Su Yue [this message]
2019-01-02  9:13   ` Nikolay Borisov
2019-01-02 10:00     ` Qu Wenruo
2019-01-02 10:07       ` Nikolay Borisov
2019-01-02 10:11         ` Qu Wenruo
2019-01-03  4:50       ` Qu Wenruo

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=fdc556bd-3134-f29e-b533-933bc6c7a2ed@gmx.com \
    --to=damenly_su@gmx.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.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;
as well as URLs for NNTP newsgroup(s).