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