lkml.org 
[lkml]   [2012]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] SCSI: Fix BLKSECTGET ioctl of sg device caculation mistake.
From
Date
On Wed, 2012-06-27 at 15:29 +0800, Cong Meng wrote:
> Fix BLKSECTGET ioctl of sg device caculation mistake.
>
> Signed-off-by: Cong Meng <mc@linux.vnet.ibm.com>
> ---
> drivers/scsi/sg.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
> index eacd46b..c424602 100644
> --- a/drivers/scsi/sg.c
> +++ b/drivers/scsi/sg.c
> @@ -1070,7 +1070,7 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg)
> return -ENODEV;
> return scsi_ioctl(sdp->device, cmd_in, p);
> case BLKSECTGET:
> - return put_user(queue_max_sectors(sdp->device->request_queue) * 512,
> + return put_user(queue_max_sectors(sdp->device->request_queue),

Really, no. This would break all existing user of the ioctl.

Even if you can find a document somewhere that says BLKSECTGET should
return sectors instead of bytes, we have to go with the ABI we've been
exporting for decades and fix up the document.

James




\
 
 \ /
  Last update: 2012-06-27 10:21    [W:0.042 / U:2.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site