linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Meng <mc@linux.vnet.ibm.com>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: stefanha@linux.vnet.ibm.com, linuxram@us.ibm.com,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	senwang@linux.vnet.ibm.com
Subject: Re: [PATCH] SCSI: Add SG_GET_SG_MAX_SEGMENT_SIZE ioctl to sg device
Date: Tue, 03 Jul 2012 15:53:23 +0800	[thread overview]
Message-ID: <1341302003.17396.20.camel@mengcong> (raw)
In-Reply-To: <1341227897.2987.15.camel@dabdike.int.hansenpartnership.com>

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
> 
> 

  reply	other threads:[~2012-07-03  7:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-02  9:20 [PATCH] SCSI: Add SG_GET_SG_MAX_SEGMENT_SIZE ioctl to sg device Cong Meng
2012-07-02 11:18 ` James Bottomley
2012-07-03  7:53   ` Cong Meng [this message]
2012-07-03  8:01     ` James Bottomley

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=1341302003.17396.20.camel@mengcong \
    --to=mc@linux.vnet.ibm.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxram@us.ibm.com \
    --cc=senwang@linux.vnet.ibm.com \
    --cc=stefanha@linux.vnet.ibm.com \
    /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).