qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 18/20] vpc: Switch to .bdrv_co_block_status()


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v4 18/20] vpc: Switch to .bdrv_co_block_status()
Date: Thu, 30 Nov 2017 17:28:59 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 11/30/2017 06:22 AM, Vladimir Sementsov-Ogievskiy wrote:
12.10.2017 21:59, Eric Blake wrote:
We are gradually moving away from sector-based interfaces, towards
byte-based.  Update the vpc driver accordingly.  Drop the now-unused
get_sector_offset().

Signed-off-by: Eric Blake <address@hidden>

---


-    offset = get_image_offset(bs, sector_num << BDRV_SECTOR_BITS, false, NULL);
-    start = offset;
-    allocated = (offset != -1);
+    image_offset = get_image_offset(bs, offset, false, NULL);
+    start = image_offset & BDRV_BLOCK_OFFSET_MASK;

why do you do so? round down to sector boundary? does it mean,
that *map will corresponds not to offset, but to some previous byte?

Ouch, leftovers from before the interface change in v4.  Will fix.


          }
-        offset = get_image_offset(bs, sector_num << BDRV_SECTOR_BITS, false,
-                                  NULL);
+        image_offset = get_image_offset(bs, offset, false, NULL);
      } while (offset == -1);

image_offset here?

Yes. (Does it show that for non-typical formats, I only compile-tested instead of actually running iotests on the format?)

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]