linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: dsterba@suse.cz,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>,
	Lu Fengqi <lufq.fnst@cn.fujitsu.com>,
	linux-btrfs@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v1] Btrfs: Switch to use new generic UUID API
Date: Mon, 21 Jan 2019 09:44:36 +0100	[thread overview]
Message-ID: <20190121084436.GC18680@lst.de> (raw)
In-Reply-To: <20190111134803.GB27146@twin.jikos.cz>

On Fri, Jan 11, 2019 at 02:48:03PM +0100, David Sterba wrote:
> >  	if (is_fstree(objectid))
> > -		uuid_le_gen(&uuid);
> > -	memcpy(root->root_item.uuid, uuid.b, BTRFS_UUID_SIZE);
> > +		guid_gen((guid_t *)&root->root_item.uuid);
> > +	else
> > +		guid_copy((guid_t *)&root->root_item.uuid, &guid_null);
> 
> I don't like the type casts, a simple wrapper would be better I think.

It seems like we should use the guid_t type in the actual strutures
instead of doing this casting.  Andy, is there any reason I'm missing
why we can't do that in btrfs?

  reply	other threads:[~2019-01-21  8:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 18:16 [PATCH v1] Btrfs: Switch to use new generic UUID API Andy Shevchenko
2019-01-11 13:48 ` David Sterba
2019-01-21  8:44   ` Christoph Hellwig [this message]
2019-01-21 18:18     ` David Sterba

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=20190121084436.GC18680@lst.de \
    --to=hch@lst.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lufq.fnst@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 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).