Message ID | 20200904200554.168979-2-tom.ty89@gmail.com |
---|---|
State | New |
Headers | show |
Series | [1/4] scsi: sg: fix BLKSECTGET ioctl | expand |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index e57831910228..0e3f084141a3 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -1118,6 +1118,8 @@ sg_ioctl_common(struct file *filp, Sg_device *sdp, Sg_fd *sfp, max_sectors = min_t(unsigned int, USHRT_MAX, queue_max_sectors(sdp->device->request_queue)); return put_user(max_sectors, ip); + case BLKSSZGET: + return put_user(queue_logical_block_size(sdp->device->request_queue), ip); case BLKTRACESETUP: return blk_trace_setup(sdp->device->request_queue, sdp->disk->disk_name,
Provide an ioctl to get the logical sector size so that the maximum bytes per request can be derived. Follow-up of the BLKSECTGET fix. Signed-off-by: Tom Yan <tom.ty89@gmail.com> --- drivers/scsi/sg.c | 2 ++ 1 file changed, 2 insertions(+)