Re: [PATCH] sd: Limit transfer length

2014-06-03 Thread Akinobu Mita
2014-06-03 4:11 GMT+09:00 Martin K. Petersen martin.peter...@oracle.com: @@ -2755,6 +2765,10 @@ static int sd_revalidate_disk(struct gendisk *disk) blk_queue_flush(sdkp-disk-queue, flush); + max_xfer = min_not_zero((unsigned int)sdp-host-max_sectors, +

[PATCH] sd: Limit transfer length

2014-06-02 Thread Martin K. Petersen
Until now the per-command transfer length has exclusively been gated by the max_sectors parameter in the scsi_host template. Given that the size of this parameter has been bumped to an unsigned int we have to be careful not to exceed the target device's capabilities. If the if the device

Re: [PATCH] sd: Limit transfer length

2014-06-02 Thread Ewan Milne
On Mon, 2014-06-02 at 15:11 -0400, Martin K. Petersen wrote: Until now the per-command transfer length has exclusively been gated by the max_sectors parameter in the scsi_host template. Given that the size of this parameter has been bumped to an unsigned int we have to be careful not to exceed