This is the final round of mostly small fixes in our initial
submit. The fix for the read only regressions is the most extensive
change and also intrudes outside of SCSI because the partition and read
only handling is mostly in block. The specific problem is the
inability to distinguish between devices marked read only by the
administrator and devices that come up read only but switch to
read/write once they are ready to receive data. Without the fix these
devices are currently forced to stay read only causing regressions in
the enterprise.
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-misc
The short changelog is:
Colin Ian King (1):
scsi: bnx2fc: fix incorrect cast to u64 on shift operation
Erwan Velu (1):
scsi: smartpqi: Reporting unhandled SCSI errors
James Smart (4):
scsi: lpfc: Update lpfc version to 12.2.0.2
scsi: lpfc: add check for loss of ndlp when sending RRQ
scsi: lpfc: correct rcu unlock issue in lpfc_nvme_info_show
scsi: lpfc: resolve lockdep warnings
Martin K. Petersen (1):
scsi: sd: block: Fix regressions in read-only block device handling
Quinn Tran (1):
scsi: qla2xxx: Add cleanup for PCI EEH recovery
YueHaibing (3):
scsi: myrs: Fix uninitialized variable
scsi: qedi: remove set but not used variables 'cdev' and 'udev'
scsi: qedi: remove memset/memcpy to nfunc and use func instead
And the diffstat:
block/blk-core.c | 2 +-
block/genhd.c | 34 ++++--
block/ioctl.c | 4 +
block/partition-generic.c | 7 +-
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 2 +-
drivers/scsi/lpfc/lpfc_attr.c | 37 +++---
drivers/scsi/lpfc/lpfc_els.c | 5 +-
drivers/scsi/lpfc/lpfc_sli.c | 84 ++++++++-----
drivers/scsi/lpfc/lpfc_version.h | 2 +-
drivers/scsi/myrs.c | 2 +-
drivers/scsi/qedi/qedi_dbg.c | 32 ++---
drivers/scsi/qedi/qedi_iscsi.c | 4 -
drivers/scsi/qla2xxx/qla_os.c | 221 +++++++++++++---------------------
drivers/scsi/sd.c | 4 +-
drivers/scsi/smartpqi/smartpqi_init.c | 23 ++--
include/linux/genhd.h | 11 +-
16 files changed, 230 insertions(+), 244 deletions(-)
James
On Fri, May 17, 2019 at 7:44 AM James Bottomley
<[email protected]> wrote:
>
> This is the final round of mostly small fixes in our initial
> submit. The fix for the read only regressions is the most extensive
> change and also intrudes outside of SCSI because the partition and read
> only handling is mostly in block.
No. That code is insane. It looks very fishy indeed to me, and I'm not
pulling it this late in the game.
If the partition table gets re-read, the old read-only state should go
away - for all ew know, the partition numbers may have changed, for
chrissake! So you can't just say "oh, partition number 1 used to be
read-only, so now we need to keep it read-only". That partition might
be something completely different after the parition table has been
invalidated.
So the new model that code uses looks completely bogus to me, and is
not anything we've ever done before.
Just revert the oneliner SCSI change that caused the regression.
Linus
Linus,
> No. That code is insane. It looks very fishy indeed to me, and I'm not
> pulling it this late in the game.
Yeah, my mess. Sorry.
A couple of people poked me about this issue last week. I merged the
patch without much scrutiny since several people had commented and
tested when it was originally posted a few months back. In looking over
the changes again, however, I agree with your assertion that it is
fishy.
> Just revert the oneliner SCSI change that caused the regression.
My patch wasn't exclusively trying to address the regression wrt. drives
that temporarily come up read-only. Device or fabric events can also
trigger revalidate and there's a whole can of worms in that department
thanks to the intersection between device characteristics changing and
the partition table potentially being updated. This was my feeble
attempt at fixing several long-standing issues in the read-only device
handling which we occasionally hit.
I'll drop the offending patch and revert Jeremy's change for now. And
then revisit the gorge of eternal peril that is revalidate...
--
Martin K. Petersen Oracle Linux Engineering