All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Eric Farman <farman@linux.vnet.ibm.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org,
	mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 3/3] block: get max_transfer limit for char (scsi-generic) devices
Date: Fri, 20 Jan 2017 17:53:59 +0800	[thread overview]
Message-ID: <20170120095359.GE29561@lemon> (raw)
In-Reply-To: <20170120093151.GD29561@lemon>

On Fri, 01/20 17:31, Fam Zheng wrote:
> > diff --git a/block/file-posix.c b/block/file-posix.c
> > index 2115155..94068ca 100644
> > --- a/block/file-posix.c
> > +++ b/block/file-posix.c
> > @@ -657,9 +657,11 @@ static int hdev_get_max_transfer_length(BlockDriverState *bs, int fd)
> >      int max_sectors = 0;
> >      short max_sectors_short = 0;
> >      if (bs->sg && ioctl(fd, BLKSECTGET, &max_sectors) == 0) {
> > +        /* sg returns a value in bytes */
> >          return max_sectors;
> 
> The variable name is now misleading, maybe use "bytes" instead?

BTW patch 2 should already make the function return bytes consistently.  Doing
it here is meaningless code churn.

Fam

  reply	other threads:[~2017-01-20  9:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19 20:51 [Qemu-devel] [PATCH v2 0/3] scsi-generic and BLKSECTGET Eric Farman
2017-01-19 20:51 ` [Qemu-devel] [PATCH v2 1/3] hw/scsi: Fix debug message of cdb structure in scsi-generic Eric Farman
2017-01-19 20:51 ` [Qemu-devel] [PATCH v2 2/3] block: Fix target variable of BLKSECTGET ioctl Eric Farman
2017-01-19 20:51 ` [Qemu-devel] [PATCH v2 3/3] block: get max_transfer limit for char (scsi-generic) devices Eric Farman
2017-01-20  9:31   ` Fam Zheng
2017-01-20  9:53     ` Fam Zheng [this message]
2017-01-20 11:34       ` Eric Farman

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=20170120095359.GE29561@lemon \
    --to=famz@redhat.com \
    --cc=farman@linux.vnet.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.