linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-scsi@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	"James E.J. Bottomley" <JBottomley@parallels.com>,
	Douglas Gilbert <dgilbert@interlog.com>
Subject: Re: [PATCH 3/4] scsi: increase upper limit for max_sectors
Date: Wed, 28 May 2014 03:39:31 -0700	[thread overview]
Message-ID: <20140528103931.GC13542@infradead.org> (raw)
In-Reply-To: <1401021816-10423-4-git-send-email-akinobu.mita@gmail.com>

On Sun, May 25, 2014 at 09:43:35PM +0900, Akinobu Mita wrote:
> max_sectors in struct Scsi_Host specifies maximum number of sectors
> allowed in a single SCSI command.  The data type of max_sectors is
> unsigned short, so the maximum transfer length per SCSI command is
> limited to less than 256MB in 4096-bytes sector size. (0xffff * 4096)
> 
> This commit increases the SCSI mid level's limitation for max_sectors
> upto the block layer's limitation for max_hw_sectors by extending the
> data type of max_sectors in struct Scsi_Host and scsi_host_template,
> so that SCSI lower level drivers can specify more than 0xffff.
> 
> This change requires the scsi disk (sd) driver to handle the requests
> whose transfer length is more than 0xffff with READ_16 or WRITE_16.
> Also, this needs to prevent SG_GET_RESERVED_SIZE and SG_SET_RESERVED_SIZE
> ioctls for the scsi generic (sg) driver from integer overflow when
> converting max_sectors to bytes.
> 
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>

Looks good, but I think this should be three patches, one for the ioctl
in sg, one for the command selection in sd, and one to change the field
with in the scsi core.


  reply	other threads:[~2014-05-28 10:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-25 12:43 [PATCH 0/4] scsi: increase upper limit for max_sectors Akinobu Mita
2014-05-25 12:43 ` [PATCH 1/4] block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX Akinobu Mita
2014-05-28 10:38   ` Christoph Hellwig
2014-05-25 12:43 ` [PATCH 2/4] block: fix SG_[GS]ET_RESERVED_SIZE ioctl when max_sectors is huge Akinobu Mita
2014-05-28 10:38   ` Christoph Hellwig
2014-05-25 12:43 ` [PATCH 3/4] scsi: increase upper limit for max_sectors Akinobu Mita
2014-05-28 10:39   ` Christoph Hellwig [this message]
2014-05-28 12:28     ` Akinobu Mita
2014-05-28 16:18   ` Elliott, Robert (Server Storage)
2014-05-29 15:04     ` Akinobu Mita
2014-05-25 12:43 ` [PATCH 4/4] scsi_debug: allow huge transfer length for read/write commands Akinobu Mita
2014-05-28 10:39   ` Christoph Hellwig

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=20140528103931.GC13542@infradead.org \
    --to=hch@infradead.org \
    --cc=JBottomley@parallels.com \
    --cc=akinobu.mita@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=dgilbert@interlog.com \
    --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).