Re: [RFC PATCH v2 05/26] qcow2: Document the Extended L2 Entries feature

2019-10-30 Thread Alberto Garcia
On Wed 30 Oct 2019 05:23:30 PM CET, Max Reitz wrote: >> +Subcluster Allocation Bitmap (for standard clusters): >> + >> +Bit 0 - 31: Allocation status (one bit per subcluster) >> + >> +1: the subcluster is allocated. In this case the >> + host cluste

Re: [RFC PATCH v2 10/26] qcow2: Update get/set_l2_entry() and add get/set_l2_bitmap()

2019-10-30 Thread Max Reitz
On 26.10.19 23:25, Alberto Garcia wrote: > Extended L2 entries are 128-bit wide: 64 bits for the entry itself and > 64 bits for the subcluster allocation bitmap. > > In order to support them correctly get/set_l2_entry() need to be > updated so they take the entry width into account in order to > c

Re: [RFC PATCH v2 09/26] qcow2: Add l2_entry_size()

2019-10-30 Thread Max Reitz
On 26.10.19 23:25, Alberto Garcia wrote: > qcow2 images with subclusters have 128-bit L2 entries. The first 64 > bits contain the same information as traditional images and the last > 64 bits form a bitmap with the status of each individual subcluster. > > Because of that we cannot assume that L2

Re: [RFC PATCH v2 05/26] qcow2: Document the Extended L2 Entries feature

2019-10-30 Thread Max Reitz
On 26.10.19 23:25, Alberto Garcia wrote: > Subcluster allocation in qcow2 is implemented by extending the > existing L2 table entries and adding additional information to > indicate the allocation status of each subcluster. > > This patch documents the changes to the qcow2 format and how they > af

Re: [RFC PATCH v2 01/26] qcow2: Add calculate_l2_meta()

2019-10-30 Thread Alberto Garcia
On Wed 30 Oct 2019 01:04:02 PM CET, Max Reitz wrote: > (I intended not to comment on such things on an RFC, but here I am...) No problem with that :-) > I’d call it host_cluster_offset to make clear that it points to a > cluster and isn’t the host offset for @guest_offset. Sure, why not. We can

Re: [RFC PATCH v2 01/26] qcow2: Add calculate_l2_meta()

2019-10-30 Thread Alberto Garcia
On Mon 28 Oct 2019 01:50:54 PM CET, Vladimir Sementsov-Ogievskiy wrote: >> -.cow_end = { >> -.offset = nb_bytes, > > hmm this logic is changed.. after the patch, it would be not nb_bytes, but > > offset_into_cluster(s, guest_offset) + MIN(*bytes, nb_bytes - > offset_into_cl

Re: [RFC PATCH v2 03/26] qcow2: Process QCOW2_CLUSTER_ZERO_ALLOC clusters in handle_copied()

2019-10-30 Thread Max Reitz
On 26.10.19 23:25, Alberto Garcia wrote: > When writing to a qcow2 file there are two functions that take a > virtual offset and return a host offset, possibly allocating new > clusters if necessary: > >- handle_copied() looks for normal data clusters that are already > allocated and have

Re: [RFC PATCH v2 01/26] qcow2: Add calculate_l2_meta()

2019-10-30 Thread Max Reitz
On 26.10.19 23:25, Alberto Garcia wrote: > handle_alloc() creates a QCowL2Meta structure in order to update the > image metadata and perform the necessary copy-on-write operations. > > This patch moves that code to a separate function so it can be used > from other places. > > Signed-off-by: Albe

[PATCH v3] qcow2-bitmap: Fix uint64_t left-shift overflow

2019-10-30 Thread Tuguoyi
There are two issues in In check_constraints_on_bitmap(), 1) The sanity check on the granularity will cause uint64_t integer left-shift overflow when cluster_size is 2M and the granularity is BIGGER than 32K. 2) The way to calculate image size that the maximum bitmap supported can map to is a bit i

Re: [PATCH v3 4/6] iotests: Skip "make check-block" if QEMU does not support virtio-blk

2019-10-30 Thread Max Reitz
On 22.10.19 09:21, Thomas Huth wrote: > The next patch is going to add some python-based tests to the "auto" > group, and these tests require virtio-blk to work properly. Running > iotests without virtio-blk likely does not make too much sense anyway, > so instead of adding a check for the availabi

Re: [PATCH] block/block-copy: fix s->copy_size for compressed cluster

2019-10-30 Thread Max Reitz
On 29.10.19 16:09, Vladimir Sementsov-Ogievskiy wrote: > 0e2402452f1f20429 allowed writes larger than cluster, but that's > unsupported for compressed write. Fix it. > > Fixes: 0e2402452f1f20429 > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/block-copy.c | 4 ++-- > 1 file changed,

RE: [PATCH v7 4/4] colo: Update Documentation for continuous replication

2019-10-30 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Thursday, October 24, 2019 10:26 PM > To: qemu-devel > Cc: Zhang, Chen ; Jason Wang > ; Wen Congyang ; > Wen Congyang ; Xie Changlong > ; Kevin Wolf ; Max Reitz > ; qemu-block > Subject: [PATCH v7 4/4] colo: Update Documentation for cont

[PATCH v2] fdc/i8257: implement verify transfer mode

2019-10-30 Thread Sven Schnelle
While working on the Tulip driver i tried to write some Teledisk images to a floppy image which didn't work. Turned out that Teledisk checks the written data by issuing a READ command to the FDC but running the DMA controller in VERIFY mode. As we ignored the DMA request in that case, the DMA trans