mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dilger, Andreas" <andreas.dilger@intel.com>
To: James Simmons <jsimmons@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	James Simmons <uja.ornl@yahoo.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Drokin, Oleg" <oleg.drokin@intel.com>,
	Lustre Development List <lustre-devel@lists.lustre.org>
Subject: Re: [PATCH v2 5/5] staging: lustre: headers: use proper byteorder functions in lustre_idl.h
Date: Tue, 13 Dec 2016 00:55:01 +0000	[thread overview]
Message-ID: <73FD0668-EDE9-4757-98ED-8A15CE5DA17C@intel.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1612121952371.29051@casper.infradead.org>

On Dec 12, 2016, at 13:00, James Simmons <jsimmons@infradead.org> wrote:
> 
> 
>> On Sat, Dec 10, 2016 at 01:06:01PM -0500, James Simmons wrote:
>>> In order for lustre_idl.h to be usable for both user
>>> land and kernel space it has to use the proper
>>> byteorder functions.
>> 
>> Why would userspace need/want all of these inline functions?  A uapi
>> header file should just have a the structures that are passed
>> user/kernel and any needed ioctls.  Why would they ever care about
>> strange byte flip functions and a ton of inline functions?
>> 
>> I don't think this is needed, of if it is, I really don't want to see
>> your crazy userspace code...
> 
> Sigh. More cleanups were done based on the idea this was okay. The
> reason this was does was when you look at the headers in
> include/uapi/linux you see a huge number of headers containing a bunch
> of inline function. To an outside project looking to merge their work
> into the kernel they would think this is okay. Hopefully all those
> broken headers will be cleaned up in the near future.
> Alright I will look to fixing up our tools to handle this requirement. 

These accessor functions are used by both the kernel and userspace
tools, and keeping them in the lustre_idl.h header avoids duplication
of code.  Similar usage exists in other filesystem related uapi headers
(e.g. auto_fs4.h, bcache.h, btrfs_tree.h, nilfs2_ondisk.h, swab.h, etc.).

That said, if there is an objection to keeping these macros/inline funcs
in the uapi headers, they still need to exist in the kernel and should
be kept in the lustre/include/lustre directory and we'll keep a separate
copy of the macros for userspace.

Cheers, Andreas

  parent reply	other threads:[~2016-12-13  0:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-10 18:05 [PATCH v2 0/5] Fix ups to make lustre_idl.h a proper UAPI header James Simmons
2016-12-10 18:05 ` [PATCH v2 1/5] staging: lustre: obdclass: Create a header for obdo related functions James Simmons
2016-12-10 18:05 ` [PATCH v2 2/5] staging: lustre: obdclass: style cleanup " James Simmons
2016-12-10 18:05 ` [PATCH v2 3/5] staging: lustre: headers: sort headers affected by obdo move James Simmons
2016-12-10 18:14   ` Greg Kroah-Hartman
2016-12-12 14:42     ` Ben Evans
2016-12-12 16:34       ` Greg Kroah-Hartman
2016-12-12 18:12         ` Ben Evans
2016-12-12 18:19         ` Joe Perches
2016-12-12 19:41           ` James Simmons
2016-12-12 19:52             ` Joe Perches
2016-12-10 18:06 ` [PATCH v2 4/5] staging: lustre: headers: Move functions out of lustre_idl.h James Simmons
2016-12-10 18:06 ` [PATCH v2 5/5] staging: lustre: headers: use proper byteorder functions in lustre_idl.h James Simmons
2016-12-10 18:16   ` Greg Kroah-Hartman
2016-12-12 20:00     ` James Simmons
2016-12-13  0:37       ` Greg Kroah-Hartman
2016-12-13  8:31         ` Dan Carpenter
2016-12-13 16:14           ` Oleg Drokin
2016-12-13 17:21             ` Dan Carpenter
2016-12-13  0:55       ` Dilger, Andreas [this message]
2016-12-13  1:07         ` Greg Kroah-Hartman
2016-12-19 17:02           ` James Simmons

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=73FD0668-EDE9-4757-98ED-8A15CE5DA17C@intel.com \
    --to=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    --cc=uja.ornl@yahoo.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

all inboxes | Powered by JetHome®