|
From: | Vladimir Sementsov-Ogievskiy |
Subject: | Re: [PATCH v4 4/9] qcow2: Support BDRV_REQ_ZERO_WRITE for truncate |
Date: | Tue, 21 Apr 2020 14:19:09 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
21.04.2020 13:50, Alberto Garcia wrote:
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.
But we also need to handle unaligned old_length, we can't just align it down, we should write zero to existing cluster if it is NORMAL cluster.. -- Best regards, Vladimir
[Prev in Thread] | Current Thread | [Next in Thread] |