linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Grover <agrover@redhat.com>
To: dgilbert@interlog.com, JBottomley@parallels.com
Cc: linux-scsi@vger.kernel.org, hch@lst.de,
	libc-alpha@sourceware.org, David Howells <dhowells@redhat.com>
Subject: Re: [PATCHv2 5/5] scsi: move scsi/sg.h to uapi/linux/sg.h
Date: Fri, 30 Jan 2015 10:07:17 -0800	[thread overview]
Message-ID: <54CBC855.8090908@redhat.com> (raw)
In-Reply-To: <54CBBF44.5060308@interlog.com>

On 01/30/2015 09:28 AM, Douglas Gilbert wrote:
> At the moment many user space programs in Linux access the SG_IO
> ioctl related declarations with:
>     #include <scsi/sg.h>
>
> I suspect that file is maintained by the glib folks (because it
> does not match the kernel file but is logically equivalent). Now
> if this change encourages those glib folks to break the above
> include (same applies to '#include <scsi/sg.h>') then that is
> a serious regression.

This is avoided by putting the new kernel-exported headers in linux/* 
instead of scsi/*. Then user programs could move to the new include over 
time, and the old glibc-provided one could be deprecated and eventually 
removed.

> So is this delayed regression likely to happen??

It shouldn't, given the different include path.

> Do we need to speak to the glib folks?

Yes for phase 2 (but CC'd) to get the glibc scsi/* headers deprecated 
and eventually removed, but phase 1 is the kernel exporting proper uapi 
headers, which have just gotten feedback for v2 and I'll be cranking out 
a v3 shortly.

> What is the appropriate include for a user space program to fetch
> sg.h in its new (proposed) location?

#include <linux/sg.h>

> For example my utilities currently use:
>     #include <linux/bsg.h>
> to fetch the bsg header but need some autotools magic to not break
> in the absence of that header (e.g. prior to around lk 2.6.30).

CCing dhowells; something similar would be needed for sg.h I imagine. To 
me it looks like scsi/{scsi, scsi_ioctl, sg}.h should maybe have been 
included in the scripted uapi changes (607ca46).

> Finally isn't the semi-flat nature of the uapi/linux directory
> asking for trouble? IOW why isn't there a uapi/linux/scsi
> directory?
>
>    # cd /usr/src/linux-3.19/include/uapi/linux/
>    # ls | wc
>      440     440    4350
>    # ls -p | grep "/" | wc
>       24      24     204
>
> The last command is counting directories (and really should
> be simpler than that).

I could see #include <linux/scsi/sg.h> as reasonable but I am just a 
worker bee on a quest to not have to define modern scsi opcodes in my 
userspace code.

Regards -- Andy

      reply	other threads:[~2015-01-30 18:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30  0:56 [PATCHv2 0/5] Move headers to uapi/linux Andy Grover
2015-01-30  0:56 ` [PATCHv2 1/5] scsi: add WRITE_VERIFY_16 to scsi.h Andy Grover
2015-01-30  0:56 ` [PATCHv2 2/5] scsi: Move ioctl defs from scsi/scsi.h to scsi/scsi_ioctl.h Andy Grover
2015-01-30  0:56 ` [PATCHv2 3/5] scsi: Move user-shareable stuff in scsi/scsi.h to uapi/linux/scsi.h Andy Grover
2015-01-30  1:24   ` James Bottomley
2015-02-02  8:00     ` Christoph Hellwig
2015-01-30  0:56 ` [PATCHv2 4/5] scsi: Move scsi/scsi_ioctl.h to uapi/linux/scsi_ioctl.h Andy Grover
2015-01-30  0:56 ` [PATCHv2 5/5] scsi: move scsi/sg.h to uapi/linux/sg.h Andy Grover
2015-01-30  1:14   ` James Bottomley
2015-01-30 17:28   ` Douglas Gilbert
2015-01-30 18:07     ` Andy Grover [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=54CBC855.8090908@redhat.com \
    --to=agrover@redhat.com \
    --cc=JBottomley@parallels.com \
    --cc=dgilbert@interlog.com \
    --cc=dhowells@redhat.com \
    --cc=hch@lst.de \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-scsi@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 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).