for the presence of external data files for us and redirect request to
underlying data_file. Here we want to do the same but avoid refcount updates,
thus we perform the same checks.
Suggested-by: Hanna Czenczek
Signed-off-by: Andrey Drobyshev
---
block/qcow2-cluster.c | 39
) and that with the option enabled cluster is still marked as
allocated in "qemu-img map" output. We also check that the option
doesn't work with qcow2 v2 images.
Signed-off-by: Andrey Drobyshev
---
tests/qemu-iotests/290 | 34 ++
tests/qemu-iotests/29
v1: https://lists.nongnu.org/archive/html/qemu-devel/2023-10/msg07223.html
Andrey Drobyshev (11):
qcow2: make function update_refcount_discard() global
qcow2: simplify L2 entries accounting for discard-no-unref
qcow2: put discard requests in the common queue when discard-no-unref
make all discard/unmap operations enable trace point 'file_do_fallocate'
so that actual fallocate() calls are visible.
Signed-off-by: Andrey Drobyshev
---
tests/qemu-iotests/271 | 70 +-
tests/qemu-iotests/271.out | 69 ++---
2
.
Also introduce struct SubClusterRangeInfo, which would contain all the
needed params.
Signed-off-by: Andrey Drobyshev
---
block/qcow2-cluster.c | 140 --
1 file changed, 108 insertions(+), 32 deletions(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2
Move the definition from iotests/250 to common.rc. This is used to
detect real disk usage of sparse files. In particular, we want to use
it for checking subclusters-based discards.
Signed-off-by: Andrey Drobyshev
---
tests/qemu-iotests/250 | 5 -
tests/qemu-iotests/common.rc | 6
) with subclusters enabled.
Also rename qcow2_cluster_discard() -> qcow2_subcluster_discard() to
reflect the change.
Signed-off-by: Andrey Drobyshev
---
block/qcow2-cluster.c | 106 +
block/qcow2-snapshot.c | 6 +--
block/qcow2.c | 25 +-
bl
whether we unmap or zeroize the cluster. For that OR'ing with
the old entry is enough.
This patch doesn't change the logic and is pure refactoring.
Signed-off-by: Andrey Drobyshev
---
block/qcow2-cluster.c | 34 +++---
1 file changed, 15 insertions(+), 19 deletions
This would ease debugging of write zeroes and discard operations.
Signed-off-by: Andrey Drobyshev
---
block/file-posix.c | 1 +
block/trace-events | 1 +
2 files changed, 2 insertions(+)
diff --git a/block/file-posix.c b/block/file-posix.c
index 35684f7e21..45134f0eef 100644
--- a/block/file
to actual unmap.
Signed-off-by: Andrey Drobyshev
---
block/qcow2-cluster.c | 26 --
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index 3c134a7e80..53e04eff93 100644
--- a/block/qcow2-cluster.c
+++ b/b
We are going to need it for discarding separate subclusters. The
function itself doesn't do anything with the refcount tables, it simply
adds a discard request to the queue, so rename it to qcow2_queue_discard().
Signed-off-by: Andrey Drobyshev
Reviewed-by: Hanna Czenczek
---
block/qcow2
When zeroizing the last non-zero subclusters within single cluster, it
makes sense to go zeroize the entire cluster and go down zero_in_l2_slice()
path right away. That way we'd also update the corresponding refcount
table.
Signed-off-by: Andrey Drobyshev
Reviewed-by: Hanna Czenczek
---
block
On 4/24/24 21:00, Andrey Drobyshev wrote:
> Hi everyone,
>
> When making an external snapshot, we end up in a situation when 2 block
> graph nodes related to the same image file (format and storage nodes)
> have different RO flags set on them.
>
> E.g.
>
> # ls -la
Hi everyone,
When making an external snapshot, we end up in a situation when 2 block
graph nodes related to the same image file (format and storage nodes)
have different RO flags set on them.
E.g.
# ls -la /proc/PID/fd
lrwx-- 1 root qemu 64 Apr 24 20:14 12 -> /path/to/harddisk.hdd
# virsh
On 10/27/23 14:10, Jean-Louis Dupond wrote:
> [...]
>
> I've checked all the code paths, and as far as I see it nowhere breaks
> the discard_no_unref option.
> It's important that we don't introduce new code paths that can make
> holes in the qcow2 image when this option is enabled :)
>
> If you
On 3/22/24 15:17, Andrey Drobyshev wrote:
> On 3/22/24 12:39, Daniel P. Berrangé wrote:
>> On Wed, Mar 20, 2024 at 06:16:42PM +0200, Andrey Drobyshev wrote:
>>> Since the commit 25b5ff1a86 ("qga: add mountpoint usage info to
>>> GuestFilesystemInfo") we have
On 3/22/24 12:39, Daniel P. Berrangé wrote:
> On Wed, Mar 20, 2024 at 06:16:42PM +0200, Andrey Drobyshev wrote:
>> Since the commit 25b5ff1a86 ("qga: add mountpoint usage info to
>> GuestFilesystemInfo") we have 2 values reported in guest-get-fsinfo:
>> use
Also remove the G_GNUC_UNUSED attribute added in the previous commit from
the helper.
Signed-off-by: Andrey Drobyshev
Reviewed-by: Daniel P. Berrangé
---
qga/commands-posix.c | 39 ++-
1 file changed, 6 insertions(+), 33 deletions(-)
diff --git a/qga
here, also tweak the docs to reflect better where those values
come from.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 2 ++
qga/commands-win32.c | 1 +
qga/qapi-schema.json | 7 +--
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/qga/commands-posix.c b/qga/comman
There's no need to check for the existence of the hook executable, as the
exec() call will do that for us.
Signed-off-by: Andrey Drobyshev
Reviewed-by: Daniel P. Berrangé
---
qga/commands-posix.c | 35 +++
1 file changed, 3 insertions(+), 32 deletions(-)
diff
declaration.
v3: https://lists.nongnu.org/archive/html/qemu-devel/2024-03/msg04068.html
Andrey Drobyshev (7):
qga: guest-get-fsinfo: add optional 'total-bytes-privileged' field
qga: introduce ga_run_command() helper for guest cmd execution
qga/commands-posix: qmp_guest_shutdown: use ga_run_command help
te.
Let's just use g_file_set_contents() to simplify things here.
Suggested-by: Daniel P. Berrangé
Signed-off-by: Andrey Drobyshev
Reviewed-by: Daniel P. Berrangé
---
qga/commands-posix.c | 41 +
1 file changed, 5 insertions(+), 36 deletions(-)
diff -
There's no need to check for the existence of "/sbin/hwclock", the
exec() call will do that for us.
Signed-off-by: Andrey Drobyshev
Reviewed-by: Daniel P. Berrangé
---
qga/commands-posix.c | 43 +++
1 file changed, 3 insertions(+), 40 deletion
There's no need to check for the existence of the "chpasswd", "pw"
executables, as the exec() call will do that for us.
Signed-off-by: Andrey Drobyshev
Reviewed-by: Daniel P. Berrangé
---
qga/commands-posix.c | 96 ++--
1 file ch
bisectable, let's replace qmp commands
implementations one by one. Also add G_GNUC_UNUSED attribute to the
helper and remove it in the next commit.
Originally-by: Yuri Pudgorodskiy
Signed-off-by: Andrey Drobyshev
Reviewed-by: Daniel P. Berrangé
---
qga/commands-posix.c | 150
On 3/19/24 19:37, Daniel P. Berrangé wrote:
> On Fri, Mar 15, 2024 at 02:29:40PM +0200, Andrey Drobyshev wrote:
>> Since the commit 25b5ff1a86 ("qga: add mountpoint usage info to
>> GuestFilesystemInfo") we have 2 values reported in guest-get-fsinfo:
>> use
On 3/19/24 20:02, Daniel P. Berrangé wrote:
> On Fri, Mar 15, 2024 at 02:29:45PM +0200, Andrey Drobyshev wrote:
>> Since commit 246d76eba ("qga: guest_suspend: decoupling pm-utils and sys
>> logic") pm-utils logic is running in a separate child from the sysfs
>>
On 3/15/24 15:44, Markus Armbruster wrote:
> [?? ??? ? ?? ?? arm...@redhat.com. ???, ?? ??? ?,
> ?? ?? https://aka.ms/LearnAboutSenderIdentification ]
>
> Andrey Drobyshev writes:
>
>> Since the commit 25b5ff1a86 ("qga:
There's no need to check for the existence of the hook executable, as the
exec() call will do that for us.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 35 +++
1 file changed, 3 insertions(+), 32 deletions(-)
diff --git a/qga/commands-posix.c b/qga
There's no need to check for the existence of the "chpasswd", "pw"
executables, as the exec() call will do that for us.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 96 ++--
1 file changed, 13 insertions(+), 83 deletions(
Also remove the G_GNUC_UNUSED attribute added in the previous commit from
the helper.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 39 ++-
1 file changed, 6 insertions(+), 33 deletions(-)
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
There's no need to check for the existence of "/sbin/hwclock", the
exec() call will do that for us.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 43 +++
1 file changed, 3 insertions(+), 40 deletions(-)
diff --git a/qga/commands
bisectable, let's replace qmp commands
implementations one by one. Also add G_GNUC_UNUSED attribute to the
helper and remove it in the next commit.
Originally-by: Yuri Pudgorodskiy
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 150 +++
1 file
te.
Let's just use g_file_set_contents() to simplify things here.
Suggested-by: Daniel P. Berrangé
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 41 +
1 file changed, 5 insertions(+), 36 deletions(-)
diff --git a/qga/commands-posix.c b/qg
tps://lists.nongnu.org/archive/html/qemu-devel/2024-03/msg00147.html
Andrey Drobyshev (7):
qga: guest-get-fsinfo: add optional 'total-bytes-root' field
qga: introduce ga_run_command() helper for guest cmd execution
qga/commands-posix: qmp_guest_shutdown: use ga_run_command helper
qga/commands-po
ere, let's document better where those values come from in both
POSIX and Windows.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 2 ++
qga/commands-win32.c | 1 +
qga/qapi-schema.json | 12 +++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/qga/commands-pos
On 3/5/24 20:34, Daniel P. Berrangé wrote:
> [Вы нечасто получаете письма от berra...@redhat.com. Узнайте, почему это
> важно, по адресу https://aka.ms/LearnAboutSenderIdentification ]
>
> On Fri, Mar 01, 2024 at 07:28:57PM +0200, Andrey Drobyshev wrote:
>> We replace the d
On 3/5/24 19:58, Daniel P. Berrangé wrote:
> On Fri, Mar 01, 2024 at 07:28:53PM +0200, Andrey Drobyshev wrote:
>> When executing guest commands in *nix environment, we repeat the same
>> fork/exec pattern multiple times. Let's just separate it into a single
>> helper whi
On 3/5/24 20:38, Daniel P. Berrangé wrote:
> On Fri, Mar 01, 2024 at 07:28:58PM +0200, Andrey Drobyshev wrote:
>> There's no need to check for the existence of the "chpasswd", "pw"
>> executables, as the exec() call will do that for us.
>>
>>
There's no need to check for the existence of "/sbin/hwclock", the
exec() call will do that for us.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 43 +++
1 file changed, 3 insertions(+), 40 deletions(-)
diff --git a/qga/commands
Also remove the G_GNUC_UNUSED attribute added in the previous commit from
the helper.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 39 ++-
1 file changed, 6 insertions(+), 33 deletions(-)
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
ues come from.
v1: https://lists.nongnu.org/archive/html/qemu-devel/2024-02/msg05766.html
Andrey Drobyshev (7):
qga: guest-get-fsinfo: add optional 'total-bytes-root' field
qga: introduce ga_run_command() helper for guest cmd execution
qga/commands-posix: qmp_guest_shutdown: use ga_run_comm
bisectable, let's replace qmp commands
implementations one by one. Also add G_GNUC_UNUSED attribute to the
helper and remove it in the next commit.
Originally-by: Yuri Pudgorodskiy
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 140 +++
1 file
There's no need to check for the existence of the "chpasswd", "pw"
executables, as the exec() call will do that for us.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 96 ++--
1 file changed, 13 insertions(+), 83 deletions(
ere, let's document better where those values come from in both
POSIX and Windows.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 2 ++
qga/commands-win32.c | 1 +
qga/qapi-schema.json | 12 +++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/qga/commands-pos
We replace the direct call to open() with a "sh -c 'echo ...'" call, so
that it becomes an executable command.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 36
1 file changed, 4 insertions(+), 32 deletions(-)
diff --git a/qga/comman
There's no need to check for the existence of the hook executable, as the
exec() call will do that for us.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 35 +++
1 file changed, 3 insertions(+), 32 deletions(-)
diff --git a/qga/commands-posix.c b/qga
On 2/28/24 09:55, Marc-André Lureau wrote:
> [Вы нечасто получаете письма от marcandre.lur...@redhat.com. Узнайте, почему
> это важно, по адресу https://aka.ms/LearnAboutSenderIdentification ]
>
> Hi
>
> On Tue, Feb 27, 2024 at 4:38 PM Andrey Drobyshev
> wrote:
>>
On 2/26/24 20:50, Konstantin Kostiuk wrote:
>
> Best Regards,
> Konstantin Kostiuk.
>
>
> On Mon, Feb 26, 2024 at 7:02 PM Andrey Drobyshev
> mailto:andrey.drobys...@virtuozzo.com>>
> wrote:
>
> Since the commit 25b5ff1a86 ("qga: add mountpoin
There's no need to check for the existence of the "chpasswd", "pw"
executables, as the exec() call will do that for us.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 96 ++--
1 file changed, 13 insertions(+), 83 deletions(
t into QGA source to understand how they're obtained. Let's
just report the values f_blocks, f_bfree, f_bavail (in bytes) from
statvfs() as they are, letting the user decide how to process them further.
Originally-by: Yuri Pudgorodskiy
Signed-off-by: Andrey Drobyshev
---
qga/commands-po
Also remove the G_GNUC_UNUSED attribute added in the previous commit from
the helper.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 39 ++-
1 file changed, 6 insertions(+), 33 deletions(-)
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
bisectable, let's replace qmp commands
implementations one by one. Also add G_GNUC_UNUSED attribute to the
helper and remove it in the next commit.
Originally-by: Yuri Pudgorodskiy
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 140 +++
1 file
We replace the direct call to open() with a "sh -c 'echo ...'" call, so
that it becomes an executable command.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 36
1 file changed, 4 insertions(+), 32 deletions(-)
diff --git a/qga/comman
values.
Andrey Drobyshev (7):
qga/commands-posix: return fsinfo values directly as reported by
statvfs
qga: introduce ga_run_command() helper for guest cmd execution
qga/commands-posix: qmp_guest_shutdown: use ga_run_command helper
qga/commands-posix: qmp_guest_set_time: use
There's no need to check for the existence of the hook executable, as the
exec() call will do that for us.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 35 +++
1 file changed, 3 insertions(+), 32 deletions(-)
diff --git a/qga/commands-posix.c b/qga
There's no need to check for the existence of "/sbin/hwclock", the
exec() call will do that for us.
Signed-off-by: Andrey Drobyshev
---
qga/commands-posix.c | 43 +++
1 file changed, 3 insertions(+), 40 deletions(-)
diff --git a/qga/commands
On 1/25/24 18:36, Andrey Drobyshev wrote:
> On 1/11/24 15:15, Andrey Drobyshev wrote:
>> On 11/1/23 18:13, Denis V. Lunev wrote:
>>> On 11/1/23 16:23, Andrey Drobyshev wrote:
>>>> Currently we emit GUEST_PANICKED event in case kvm_vcpu_ioctl() returns
>>>>
On 1/25/24 18:46, Vladimir Sementsov-Ogievskiy wrote:
> On 11.12.23 13:55, Andrey Drobyshev wrote:
>> In case we're truncating an image opened with O_DIRECT, we might get
>> -EINVAL on write with unaligned buffer. In particular, when running
>> iotests/298 with '-nocache'
On 1/26/24 12:24, Kevin Wolf wrote:
> Am 11.12.2023 um 14:32 hat Andrey Drobyshev geschrieben:
>> There're tests whose logic implies running without O_DIRECT set,
>> otherwise they fail when running iotests in '-nocache' mode. For these
>> tests let's add _require_no_o_dire
On 1/11/24 14:53, Andrey Drobyshev wrote:
> On 12/11/23 13:27, Denis V. Lunev wrote:
>> On 12/11/23 11:55, Andrey Drobyshev wrote:
>>> In case we're truncating an image opened with O_DIRECT, we might get
>>> -EINVAL on write with unaligned buffer. In particular, w
On 1/11/24 15:15, Andrey Drobyshev wrote:
> On 11/1/23 18:13, Denis V. Lunev wrote:
>> On 11/1/23 16:23, Andrey Drobyshev wrote:
>>> Currently we emit GUEST_PANICKED event in case kvm_vcpu_ioctl() returns
>>> KVM_EXIT_SYSTEM_EVENT with the event type KVM_SYSTEM_EVE
On 1/11/24 14:53, Andrey Drobyshev wrote:
> On 12/11/23 15:32, Andrey Drobyshev wrote:
>> There're tests whose logic implies running without O_DIRECT set,
>> otherwise they fail when running iotests in '-nocache' mode. For these
>> tests let's add _require_no_o_direct() he
On 1/24/24 19:59, Denis V. Lunev wrote:
> On 1/24/24 18:43, Eric Blake wrote:
>> On Wed, Jan 24, 2024 at 06:22:57PM +0200, Andrey Drobyshev wrote:
>>> If socket path is too long (longer than 108 bytes), socket can't be
>>> opened. This might lead to failure when t
-by: Andrey Drobyshev
---
tests/qemu-iotests/264 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/264 b/tests/qemu-iotests/264
index c532ccd809..c6ba2754e2 100755
--- a/tests/qemu-iotests/264
+++ b/tests/qemu-iotests/264
@@ -25,7 +25,8 @@ import os
import iotests
-by: Andrey Drobyshev
---
tests/qemu-iotests/277 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/277 b/tests/qemu-iotests/277
index 24833e7eb6..4224202ac2 100755
--- a/tests/qemu-iotests/277
+++ b/tests/qemu-iotests/277
@@ -27,7 +27,8 @@ from iotests import file_path
On 11/1/23 18:13, Denis V. Lunev wrote:
> On 11/1/23 16:23, Andrey Drobyshev wrote:
>> Currently we emit GUEST_PANICKED event in case kvm_vcpu_ioctl() returns
>> KVM_EXIT_SYSTEM_EVENT with the event type KVM_SYSTEM_EVENT_CRASH. Let's
>> extend this scenario and emit G
On 12/11/23 13:27, Denis V. Lunev wrote:
> On 12/11/23 11:55, Andrey Drobyshev wrote:
>> In case we're truncating an image opened with O_DIRECT, we might get
>> -EINVAL on write with unaligned buffer. In particular, when running
>> iotests/298 with '-nocache' we get:
On 12/11/23 15:32, Andrey Drobyshev wrote:
> There're tests whose logic implies running without O_DIRECT set,
> otherwise they fail when running iotests in '-nocache' mode. For these
> tests let's add _require_no_o_direct() helper which can be put in the
> preabmle and which makes su
does have
'direct-io' mode (see https://docs.kernel.org/filesystems/fuse-io.html)
we aren't using it yet, thus getting errors like:
qemu-io: can't open device /path/to/t.qcow2.fuse: Could not open
'/path/to/t.qcow2.fuse': filesystem does not support O_DIRECT
Signed-off-by: Andrey Drobyshev
the buffer using qemu_blockalign0() instead.
Signed-off-by: Andrey Drobyshev
---
block/file-posix.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index b862406c71..cee8de510b 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
On 12/4/23 19:09, Marc-André Lureau wrote:
> Hi
>
> On Mon, Dec 4, 2023 at 9:01 PM Andrey Drobyshev
> wrote:
>>
>> On 12/4/23 18:51, Marc-André Lureau wrote:
>>> Hi
>>>
>>> On Mon, Dec 4, 2023 at 8:33 PM Andrey Drobyshev
>>> wrote:
&
On 12/4/23 18:51, Marc-André Lureau wrote:
> Hi
>
> On Mon, Dec 4, 2023 at 8:33 PM Andrey Drobyshev
> wrote:
>>
>> Since the commit a85d09269b QGA_OS_RELEASE variable points to the path
>> relative to the build dir. Then on qemu-ga startup this path can't be
>&g
a85d09269bb1a7071d3ce0f2957e3ca9dba7c047.
Signed-off-by: Andrey Drobyshev
---
tests/unit/test-qga.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/unit/test-qga.c b/tests/unit/test-qga.c
index 671e83cb86..47cf5e30ec 100644
--- a/tests/unit/test-qga.c
+++ b/tests
On 11/1/23 18:13, Denis V. Lunev wrote:
> On 11/1/23 16:23, Andrey Drobyshev wrote:
>> Currently we emit GUEST_PANICKED event in case kvm_vcpu_ioctl() returns
>> KVM_EXIT_SYSTEM_EVENT with the event type KVM_SYSTEM_EVENT_CRASH. Let's
>> extend this scenario and emit G
lt) (deprecated)".
To fix potential issues here, let's relax that requirement and detect
the mere presence of " (default)" line instead.
Signed-off-by: Andrey Drobyshev
---
tests/qemu-iotests/testenv.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu
On 10/31/23 18:33, Hanna Czenczek wrote:
> (Sorry, opened another reply window, forgot I already had one open...)
>
> On 20.10.23 23:56, Andrey Drobyshev wrote:
>> This commit makes the discard operation work on the subcluster level
>> rather than cluster
On 11/3/23 17:19, Hanna Czenczek wrote:
> On 20.10.23 23:56, Andrey Drobyshev wrote:
>> When zeroizing subclusters within single cluster, detect usage of the
>> BDRV_REQ_MAY_UNMAP flag and fall through to the subcluster-based discard
>> operation, much like it's done w
On 11/3/23 17:51, Hanna Czenczek wrote:
> On 20.10.23 23:56, Andrey Drobyshev wrote:
>> Add _verify_du_delta() checker which is used to check that real disk
>> usage delta meets the expectations. For now we use it for checking that
>> subcluster-based discard/unmap operation
On 10/31/23 18:32, Hanna Czenczek wrote:
> On 20.10.23 23:56, Andrey Drobyshev wrote:
>> This commit makes the discard operation work on the subcluster level
>> rather than cluster level. It introduces discard_l2_subclusters()
>> function and makes use of it in qcow2 discard
On 11/3/23 17:59, Hanna Czenczek wrote:
> On 03.11.23 16:51, Hanna Czenczek wrote:
>> On 20.10.23 23:56, Andrey Drobyshev wrote:
>
> [...]
>
>>> @@ -528,6 +543,14 @@ for use_backing_file in yes no; do
>>> else
>>> _make_test_img -o ex
On 11/3/23 17:20, Hanna Czenczek wrote:
> On 20.10.23 23:56, Andrey Drobyshev wrote:
>> Move the definition from iotests/250 to common.rc. This is used to
>> detect real disk usage of sparse files. In particular, we want to use
>> it for checking subclusters-based disca
Hello Hanna,
Sorry for the delay and thanks for your thorough and detailed review.
On 10/31/23 17:53, Hanna Czenczek wrote:
> On 20.10.23 23:56, Andrey Drobyshev wrote:
>> This helper simply obtains the l2 table parameters of the cluster which
>> contains the given subclusters ra
On 11/1/23 11:50, Michael Tokarev wrote:
> 19.09.2023 19:57, Andrey Drobyshev via wrote:
>> In case when we're rebasing within one backing chain, and when target
>> image
>> is larger than old backing file, bdrv_is_allocated_above() ends up
>> setting
>> *pnum
operational anyway.
Signed-off-by: Andrey Drobyshev
Acked-by: Denis V. Lunev
---
accel/kvm/kvm-all.c | 19 +++
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index e39a810a4e..d74b3f0b0e 100644
--- a/accel/kvm/kvm-all.c
+++ b
On 10/26/23 09:32, Michael Tokarev wrote:
> 01.06.2023 22:28, Andrey Drobyshev via:
>> In case when we're rebasing within one backing chain, and when target
>> image
>> is larger than old backing file, bdrv_is_allocated_above() ends up
>> setting
>> *pnum = 0.
for discarding particular subcluster within
one cluster.
Signed-off-by: Andrey Drobyshev
---
tests/qemu-iotests/271 | 25 -
tests/qemu-iotests/271.out | 2 ++
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/271 b/tests/qemu-iotests/271
index
When zeroizing the last non-zero subclusters within single cluster, it
makes sense to go zeroize the entire cluster and go down zero_in_l2_slice()
path right away. That way we'd also update the corresponding refcount
table.
Signed-off-by: Andrey Drobyshev
---
block/qcow2-cluster.c | 18
.
Also introduce struct SubClusterRangeInfo, which would contain all the
needed params.
Signed-off-by: Andrey Drobyshev
---
block/qcow2-cluster.c | 90 +--
1 file changed, 62 insertions(+), 28 deletions(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2
to actual unmap.
Signed-off-by: Andrey Drobyshev
---
block/qcow2-cluster.c | 17 ++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index cf40f2dc12..040251f2c3 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2
are enabled.
Andrey Drobyshev (7):
qcow2: make function update_refcount_discard() global
qcow2: add get_sc_range_info() helper for working with subcluster
ranges
qcow2: zeroize the entire cluster when there're no non-zero
subclusters
qcow2: make subclusters discardable
qcow2
) with subclusters enabled.
Signed-off-by: Andrey Drobyshev
---
block/qcow2-cluster.c | 100 --
block/qcow2.c | 8 ++--
2 files changed, 101 insertions(+), 7 deletions(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index 7c6fa5524c
We are going to need it for discarding separate subclusters. The
function itself doesn't do anything with the refcount tables, it simply
adds a discard request to the queue, so rename it to qcow2_queue_discard().
Signed-off-by: Andrey Drobyshev
---
block/qcow2-refcount.c | 8
block
Move the definition from iotests/250 to common.rc. This is used to
detect real disk usage of sparse files. In particular, we want to use
it for checking subclusters-based discards.
Signed-off-by: Andrey Drobyshev
---
tests/qemu-iotests/250 | 5 -
tests/qemu-iotests/common.rc | 6
On 10/2/23 09:35, Andrey Drobyshev wrote:
> On 9/19/23 20:57, Andrey Drobyshev wrote:
>> v2 --> v3:
>> * Patch 3/8: fixed logic in the if statement, so that we align on blk
>>when blk_old_backing == NULL;
>> * Patch 4/8: comment fix;
>> * Patch
On 9/19/23 20:57, Andrey Drobyshev wrote:
> v2 --> v3:
> * Patch 3/8: fixed logic in the if statement, so that we align on blk
>when blk_old_backing == NULL;
> * Patch 4/8: comment fix;
> * Patch 5/8: comment fix; dropped redundant "if (blk_new_backing)"
>
munging issue in the first place.
>
> Fixes: 3bd2608d ("maint: Add .mailmap entries for patches claiming list
> authorship")
> CC: Andrey Drobyshev
> Cc: Peter Maydell
> Signed-off-by: Eric Blake
> ---
>
> I'm sending this email with a temporary 'git
From: Andrey Drobyshev
This fixes authorship of commits 2848289168, 52b10c9c0c as the mailing
list rewrote the "From:" field in the corresponding patches. See commit
3bd2608db7 ("maint: Add .mailmap entries for patches claiming list
authorship") for explanation.
Signed-off-
further down the loop body, as the offsets beyond the old backing size need
to be explicitly zeroed.
Signed-off-by: Andrey Drobyshev
Reviewed-by: Denis V. Lunev
Reviewed-by: Hanna Czenczek
---
qemu-img.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/qemu-img.c b
y case we end up aligning
to the smallest unit of allocation.
Signed-off-by: Andrey Drobyshev
---
qemu-img.c | 74 +++---
1 file changed, 54 insertions(+), 20 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index 0f67b021f7..a2d6241648 100644
--- a/
1 - 100 of 192 matches
Mail list logo