From: Christoph Hellwig <hch@infradead.org>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-api@vger.kernel.org,
Ext4 Developers List <linux-ext4@vger.kernel.org>,
linux-btrfs <linux-btrfs@vger.kernel.org>,
Ted Ts'o <tytso@mit.edu>
Subject: Re: exporting uuid_t from uapi/linux/uuid.h
Date: Tue, 21 Aug 2018 23:05:18 -0700 [thread overview]
Message-ID: <20180822060518.GA28873@infradead.org> (raw)
In-Reply-To: <ffc387b8-09f5-537a-c5a9-08ec28e088e0@suse.com>
On Tue, Aug 21, 2018 at 10:25:50PM +0300, Nikolay Borisov wrote:
> Hello,
>
> I'm doing some refactoring on btrfs and would like to convert some of
> the "naked" definition of UUID in on-disk object to uuid_t. Since those
> structs are defined in include/uapi/linux/btrfs_tree.h I naturally would
> need to expose the kernel uuid_t to the uapi header via
> include/uapi/linux/uuid.h. The uuid was originally unexported in
> 60927bc31436 ("uuid: remove uuid_be defintions from the uapi header")
> but at that time it was called uuid_be. The thing is that btrfs-progs
> for example uses both btrfs_tree.h uapi header as well as libuuid. THe
> latter also defines uuid_t. Both the kernel one and libuuid are binary
> compatible.
>
> So what's the correct way (if any) to expose a kernel type that might
> have also been defined by a userspace library?
Please just use an raw array of __u8 for your APIs.
prev parent reply other threads:[~2018-08-22 6:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-21 19:25 exporting uuid_t from uapi/linux/uuid.h Nikolay Borisov
2018-08-22 6:05 ` Christoph Hellwig [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=20180822060518.GA28873@infradead.org \
--to=hch@infradead.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=tytso@mit.edu \
/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).