Skip to content

scsi: increase upper limit for max_sectors

Akinobu Mita linux-scsi 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 6 repliesIn review
  2. v14 patches 7 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAXblock/compat_ioctl.c block/ioctl.c+8 -31 reply
2/6block: fix SG_[GS]ET_RESERVED_SIZE ioctl when max_sectors is hugeblock/scsi_ioctl.c+11 -40 replies
3/6sg: prevent integer overflow when converting from sectors to bytesdrivers/scsi/sg.c+13 -41 reply
4/6sd: use READ_16 or WRITE_16 when transfer length is greater than 0xffffdrivers/scsi/sd.c+1 -41 reply
5/6scsi: increase upper limit for max_sectorsinclude/scsi/scsi_host.h+2 -21 reply
6/6scsi_debug: allow huge transfer length for read/write commandsdrivers/scsi/scsi_debug.c+3 -32 replies

Reviews trailers per patch

5 of 6 patches have a Reviewed-by or Acked-by.

PatchChristoph HellwigMartin K. Petersen
1/6R-b R-b
2/6R-b
3/6
4/6R-b
5/6R-b
6/6R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/6] scsi: increase upper limit for max_sectors

This patchset increases the SCSI mid level's limitation for max_sectors upto the block layer's limitation for max_hw_sectors, and enables the scsi_debug driver to request read/write commands with huge transfer length. This also includes a few fixes for the problems which can be caused by huge max_sectors.

* Changes in v2
- Add Reviewed-by line
- Split the scsi core change into three patches, suggested by Christoph Hellwig
- Reorder conditional in command selection, suggested by Elliott, Robert

Akinobu Mita (6):
block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX
block: fix SG_[GS]ET_RESERVED_SIZE ioctl when max_sectors is huge
sg: prevent integer overflow when converting from sectors to bytes
sd: use READ_16 or WRITE_16 when transfer length is greater than

    0xffff

scsi: increase upper limit for max_sectors
scsi_debug: allow huge transfer length for read/write commands

 block/compat_ioctl.c      |  6 ++++--
 block/ioctl.c             |  5 ++++-
 block/scsi_ioctl.c        | 15 +++++++++++----
 drivers/scsi/scsi_debug.c |  6 +++---
 drivers/scsi/sd.c         |  5 +----
 drivers/scsi/sg.c         | 17 +++++++++++++----
 include/scsi/scsi_host.h  |  4 ++--
 7 files changed, 38 insertions(+), 20 deletions(-)
Cc "Elliott, Robert" <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Jens Axboe <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc Douglas Gilbert <[email protected]>
Signature · 1 line
1.9.1