[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/1] vmdk: Use bdrv_nb_sectors() where sectors,
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 1/1] vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wanted |
Date: |
Thu, 21 Aug 2014 08:43:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Fam Zheng <address@hidden> writes:
> On Wed, 08/20 19:07, Markus Armbruster wrote:
>> Instead of bdrv_getlength().
>>
>> Commit 57322b7 did this all over block, but one more bdrv_getlength()
>> has crept in since.
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> block/vmdk.c | 11 +++++------
>> 1 file changed, 5 insertions(+), 6 deletions(-)
>>
>> diff --git a/block/vmdk.c b/block/vmdk.c
>> index 01412a8..3b74e85 100644
>> --- a/block/vmdk.c
>> +++ b/block/vmdk.c
>> @@ -397,7 +397,7 @@ static int vmdk_add_extent(BlockDriverState *bs,
>> {
>> VmdkExtent *extent;
>> BDRVVmdkState *s = bs->opaque;
>> - int64_t length;
>> + int64_t nb_sectors;
>>
>> if (cluster_sectors > 0x200000) {
>> /* 0x200000 * 512Bytes = 1GB for one cluster is unrealistic */
>> @@ -413,9 +413,9 @@ static int vmdk_add_extent(BlockDriverState *bs,
>> return -EFBIG;
>> }
>>
>> - length = bdrv_getlength(file);
>> - if (length < 0) {
>> - return length;
>> + nb_sectors = bdrv_getlength(file);
>
> Should be bdrv_nb_sectors.
Brown paperbag... I shouldn't do "trivial" patches when tired.
I wish "make check-block" covered a bit more, or there was something
that does while being trivial enough for me to run it unthinkingly.
Thanks!
[...]
- [Qemu-devel] [PATCH 1/1] vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wanted, Markus Armbruster, 2014/08/20
- Re: [Qemu-devel] [PATCH 1/1] vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wanted, Eric Blake, 2014/08/20
- Re: [Qemu-devel] [PATCH 1/1] vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wanted, Fam Zheng, 2014/08/20
- Re: [Qemu-devel] [PATCH 1/1] vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wanted,
Markus Armbruster <=
- Re: [Qemu-devel] [PATCH 1/1] vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wanted, Fam Zheng, 2014/08/21
- Re: [Qemu-devel] [PATCH 1/1] vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wanted, Kevin Wolf, 2014/08/21
- Re: [Qemu-devel] [PATCH 1/1] vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wanted, Markus Armbruster, 2014/08/21
- Re: [Qemu-devel] [PATCH 1/1] vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wanted, Eric Blake, 2014/08/21