|
From: | Anton Nefedov |
Subject: | Re: [Qemu-devel] [PATCH v7 3/9] block: introduce BDRV_REQ_ALLOCATE flag |
Date: | Thu, 1 Feb 2018 16:34:39 +0300 |
User-agent: | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 31/1/2018 8:31 PM, Max Reitz wrote:
On 2018-01-30 13:34, Anton Nefedov wrote:Offtop: does REQ_ZERO_WRITE override REQ_WRITE_COMPRESSED in this function? at least with !REQ_MAY_UNMAP it looks wrongLooks like zero detection will indeed override compression. I think that was intended, but I don't even have an opinion either way. Of course, it wouldn't be so nice if you tried to compress something and then, because the zero write failed, you actually write uncompressed zeroes... But since zero detection is an optional feature, it might be your own fault if you enable it when you want compression anyway, and if you write to some format/protocol combination that doesn't allow zero writes. Max
Is it detection only? I guess in case the caller sets (REQ_ZERO_WRITE | REQ_COMPRESSED) it also fires here. Looks like noone does that though, but for example backup might; it supports compression, and it also does a zero detection itself and calls write_zeroes() when it can. It sets REQ_MAY_UNMAP which should indeed override a compression, but unmap might be not supported. /Anton
[Prev in Thread] | Current Thread | [Next in Thread] |