All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: Jeff Mahoney <jeffm@suse.com>,
	Btrfs Development List <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 0/8] btrfs: uapi migration for user-visible API components
Date: Wed, 27 Apr 2016 15:37:48 -0400	[thread overview]
Message-ID: <d6511ac6-bcaa-5c14-b802-d3741554cb0f@fb.com> (raw)
In-Reply-To: <1459541670-4097-1-git-send-email-jeffm@suse.com>

On 04/01/2016 04:14 PM, Jeff Mahoney wrote:
> commit 55e301fd57a (Btrfs: move fs/btrfs/ioctl.h to
> include/uapi/linux/btrfs.h) was intended to make the ioctl definitions
> available to userspace.  Unfortunately, moving just that file wasn't
> enough and many of the ioctls aren't actually usable without the
> userspace programmer filling in the gaps.  Specifically, for the routine
> ioctls like BTRFS_IOC_SETLABEL, BTRFS_LABEL_SIZE wasn't defined so the
> ioctl definition would be incomplete.  We were also missing
> the argument structure for defrag.  Beyond that, many of the ioctl
> structures have a flags field that may or may not be independent of
> the btrfs internals.  Lastly, the SEARCH_TREE ioctl exposes all of the
> internal items of the tree to userspace programmers so the item
> structures should be exposed so that they can be parsed properly.
>
> So, to make all this more convenient for consumers of these APIs, I've
> moved the flags used by the ioctl structures into btrfs.h and
> moved the item definitions, key IDs, tree root objectids, and other
> well-known objectids into a new btrfs_tree.h.  ctree.h includes this
> new header directly, so there aren't any changes to .c files at all.
>
> The only part of this set that isn't just a direct cut-and-paste is
> the last one which converts u8 and u64 values to __u8 and __u64 since
> the former aren't exported via include/uapi.
>
> The goal is that everything required to use the btrfs ioctls for a
> particular kernel release should be made available by exporting the uapi
> headers for that release.
>
> I intend to use these for the strace ioctl decoding patch I've been
> working on so that I don't need to duplicate of the definitions in the
> code I send upstream as the final version of the patch.  Prior to this
> patchset, I had to duplicate nearly 100 defines and several structures --
> and that's without doing any item decoding at all.
>
> I do expect there might be some discussion here. :)
>

Looks fine to me, you can add my

Reviewed-by: Josef Bacik <jbacik@fb.com>

to the whole series.  Thanks,

Josef


  parent reply	other threads:[~2016-04-27 19:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 20:14 [PATCH 0/8] btrfs: uapi migration for user-visible API components Jeff Mahoney
2016-04-01 20:14 ` [PATCH 1/8] btrfs: uapi/linux/btrfs.h migration, move BTRFS_LABEL_SIZE Jeff Mahoney
2016-04-27 19:23   ` Liu Bo
2016-04-01 20:14 ` [PATCH 2/8] btrfs: uapi/linux/btrfs.h migration, qgroup limit flags Jeff Mahoney
2016-04-27 19:24   ` Liu Bo
2016-04-01 20:14 ` [PATCH 3/8] btrfs: uapi/linux/btrfs.h migration, document subvol flags Jeff Mahoney
2016-04-27 20:27   ` Liu Bo
2016-04-01 20:14 ` [PATCH 4/8] btrfs: uapi/linux/btrfs.h migration, move feature flags Jeff Mahoney
2016-04-27 21:08   ` Liu Bo
2016-04-01 20:14 ` [PATCH 5/8] btrfs: uapi/linux/btrfs.h migration, move balance flags Jeff Mahoney
2016-04-27 21:09   ` Liu Bo
2016-04-01 20:14 ` [PATCH 6/8] btrfs: uapi/linux/btrfs.h migration, move struct btrfs_ioctl_defrag_range_args Jeff Mahoney
2016-04-27 21:10   ` Liu Bo
2016-04-01 20:14 ` [PATCH 7/8] btrfs: uapi/linux/btrfs_tree.h migration, item types and defines Jeff Mahoney
2016-04-27 21:12   ` Liu Bo
2016-04-01 20:14 ` [PATCH 8/8] btrfs: uapi/linux/btrfs_tree.h, use __u8 and __u64 Jeff Mahoney
2016-04-27 21:12   ` Liu Bo
2016-04-27 19:37 ` Josef Bacik [this message]
2016-04-27 22:42 ` [PATCH 0/8] btrfs: uapi migration for user-visible API components 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=d6511ac6-bcaa-5c14-b802-d3741554cb0f@fb.com \
    --to=jbacik@fb.com \
    --cc=jeffm@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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.