[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 4/9] qcow2: Support BDRV_REQ_ZERO_WRITE for truncate
From: |
Alberto Garcia |
Subject: |
Re: [PATCH v4 4/9] qcow2: Support BDRV_REQ_ZERO_WRITE for truncate |
Date: |
Tue, 21 Apr 2020 12:50:16 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Tue 21 Apr 2020 10:47:17 AM CEST, Vladimir Sementsov-Ogievskiy
<address@hidden> wrote:
>> + if ((flags & BDRV_REQ_ZERO_WRITE) && offset > old_length) {
>> + ret = qcow2_cluster_zeroize(bs, old_length, offset - old_length, 0);
>
> Hmm. As I understand, qcow2_cluster_zeroize is unprepared to
> cluster-unaligned offset/size. I think we should handle it somehow.
You're right, it actually hits an assertion :-/
I suppose you can simply round the size up to the next cluster.
Berto