On 2018-04-11 12:25 PM, Johannes Thumshirn wrote:
On Wed, Apr 11, 2018 at 12:20:49PM -0400, Martin K. Petersen wrote:
Johannes,
While we're at it, anyone still in love with the non SAM_ status
bytes? If not they'll be gone afterwards as well.
/me is up for some spring cleaning.
Just be careful not to break any sg/bsg apps that rely on them.
Good point. In _theory_ all should be fine if I'm not removing the
actual defines if they're exported. Will be checking.
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.
Doug Gilbert