Re: [PATCH v4 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-05-04 Thread Alexander Ivanov
Yes, there is a bug. Thank you. On 4/29/23 00:15, Mike Maslenkin wrote: There is another issue with host_cluster_index() function. After this patchset applied `qemu-img check -f parallels some_disk` aborts for empty (just created) disk image. The problem is that host_cluster_index() returns 0

Re: [PATCH v4 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-04-28 Thread Mike Maslenkin
There is another issue with host_cluster_index() function. After this patchset applied `qemu-img check -f parallels some_disk` aborts for empty (just created) disk image. The problem is that host_cluster_index() returns 0 and then bitmap_new(0) rises an abort. For default empty disk

Re: [PATCH v4 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-04-28 Thread Alexander Ivanov
On 4/27/23 15:46, Mike Maslenkin wrote: Sorry for the noise again , but I have another note No, you don't need to apologize. You help me make code better. On Mon, Apr 24, 2023 at 12:44 PM Alexander Ivanov wrote: Cluster offsets must be unique among all the BAT entries. Find duplicate

Re: [PATCH v4 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-04-27 Thread Mike Maslenkin
Sorry for the noise again , but I have another note On Mon, Apr 24, 2023 at 12:44 PM Alexander Ivanov wrote: > > Cluster offsets must be unique among all the BAT entries. Find duplicate > offsets in the BAT and fix it by copying the content of the relevant > cluster to a newly allocated cluster

Re: [PATCH v4 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-04-27 Thread Alexander Ivanov
Good point. Thank you. Best regards, Alexander Ivanov On 4/26/23 23:56, Mike Maslenkin wrote: On Mon, Apr 24, 2023 at 12:44 PM Alexander Ivanov wrote: Cluster offsets must be unique among all the BAT entries. Find duplicate offsets in the BAT and fix it by copying the content of the relevant

Re: [PATCH v4 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-04-26 Thread Mike Maslenkin
On Mon, Apr 24, 2023 at 12:44 PM Alexander Ivanov wrote: > > Cluster offsets must be unique among all the BAT entries. Find duplicate > offsets in the BAT and fix it by copying the content of the relevant > cluster to a newly allocated cluster and set the new cluster offset to the > duplicated

[PATCH v4 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-04-24 Thread Alexander Ivanov
Cluster offsets must be unique among all the BAT entries. Find duplicate offsets in the BAT and fix it by copying the content of the relevant cluster to a newly allocated cluster and set the new cluster offset to the duplicated entry. Add host_cluster_index() helper to deduplicate the code. Move