[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/3] block: get max_transfer lim
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [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 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
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