On Wed, 2018-04-11 at 17:45 -0400, Douglas Gilbert wrote:
> It is a good bet that some sg based apps in the wild will be using the
> old (shifted+masked) SCSI status defines. The basis of the sg_v3 interface
> is 'struct sg_io_hdr' and it has two SCSI status fields: 'status' and
> 'masked_status'. The latter one matches the old SCSI status defines
> that you want to get rid of. I think that it is fine to get rid of
> them in the kernel, but not in the user space.
> A suggestion: you create a new header called scsi_legacy.h in the
> uapi/linux directory that is only included at the start of scsi.h
> when __KERNEL__ is not defined. And in scsi_legacy.h prefix those old
> defines with a comment like: ... please use don't use the following
> defines, use the ones that start with SAM_STAT_ found in .... instead.
A change I made in the include/scsi/scsi.h header file in 2015 has not yet
made it into the latest glibc /usr/include/scsi/scsi.h header file. So I
think we don't have to worry about backwards compatibility in the header
files under include/scsi. The glibc maintainers however might appreciate it
if we would introduce files under include/uapi/scsi that they can copy
instead of having to maintain the glibc SCSI header files themselves.