lkml.org 
[lkml]   [2012]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] SCSI: Add SG_GET_SG_MAX_SEGMENT_SIZE ioctl to sg device
From
Date
On Mon, 2012-07-02 at 12:18 +0100, James Bottomley wrote:
> On Mon, 2012-07-02 at 17:20 +0800, Cong Meng wrote:
> > Add a new ioctl cmd to get the max segment size. It's useful in
> > virtualization environment for guest to know the queue limits, so
> > that the guest kicks off legal scsi command to a sg device.
>
> What's wrong with simply looking in the /sys for this? Plus, if you can

Adding this ioctl is a big convenience for the programs, qemu
in my case, to which parameter that likes '/dev/sgX' is given.
With this ioctl, those programs only need to issue an ioctl to
get the queue limit. Otherwise, 'dev/sgX' is needed to convert
to /sys path, then open and read it.
In addition, the potential variation and exceptional situation
of sys FS, EX mount path, are needed to consider as well.
Is my justification acceptable?

> come up with a justifiable reason, this needs to be in block as well so
> we can send it to all SCSI devices regardless of what ULD people use.
I can do it.

Thanks.
Cong.
>
> James
>
>




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