[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 4/9] block: introduce BDRV_REQ_ALLOCATE flag
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [PATCH v8 4/9] block: introduce BDRV_REQ_ALLOCATE flag |
Date: |
Fri, 16 Mar 2018 12:01:02 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Mon 12 Mar 2018 11:16:53 AM CET, Anton Nefedov wrote:
> The flag is supposed to indicate that the region of the disk image has
> to be sufficiently allocated so it reads as zeroes.
>
> The call with the flag set must return -ENOTSUP if allocation cannot
> be done efficiently.
> This has to be made sure of by both
> - the drivers that support the flag
> - and the common block layer (so it will not fall back to any slowpath
> (like writing zero buffers) in case the driver does not support
> the flag).
>
> Signed-off-by: Anton Nefedov <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Reviewed-by: Alberto Garcia <address@hidden>
Hmm... this is not the patch that I reviewed, please remove the R-b
lines when you submit a modified patch.
> + /* The BDRV_REQ_ALLOCATE flag is used to indicate that the driver has to
> + * efficiently allocate the space so it reads as zeroes, or return an
> error.
> + * Must be used together with BDRV_REQ_ZERO_WRITE.
I guess it's understandable from the context but it's not immediately
obvious that you can set BDRV_REQ_ZERO_WRITE but not this one.
Perhaps it could be rephrased as something like "If this is set then
BDRV_REQ_ZERO_WRITE must also be set".
> + * Contradictory to BDRV_REQ_MAY_UNMAP so the two must not be used
> together.
Or simply "This flag cannot be set together with BDRV_REQ_MAY_UNMAP".
> + */
> + BDRV_REQ_ALLOCATE = 0x40,
Berto
- [Qemu-devel] [PATCH v8 0/9] qcow2: cluster space preallocation, Anton Nefedov, 2018/03/12
- [Qemu-devel] [PATCH v8 2/9] blkverify: set supported write/zero flags, Anton Nefedov, 2018/03/12
- [Qemu-devel] [PATCH v8 1/9] mirror: inherit supported write/zero flags, Anton Nefedov, 2018/03/12
- [Qemu-devel] [PATCH v8 3/9] quorum: set supported write/zero flags, Anton Nefedov, 2018/03/12
- [Qemu-devel] [PATCH v8 4/9] block: introduce BDRV_REQ_ALLOCATE flag, Anton Nefedov, 2018/03/12
- Re: [Qemu-devel] [PATCH v8 4/9] block: introduce BDRV_REQ_ALLOCATE flag,
Alberto Garcia <=
- [Qemu-devel] [PATCH v8 6/9] file-posix: support BDRV_REQ_ALLOCATE, Anton Nefedov, 2018/03/12
- [Qemu-devel] [PATCH v8 5/9] block: treat BDRV_REQ_ALLOCATE as serialising, Anton Nefedov, 2018/03/12
- [Qemu-devel] [PATCH v8 7/9] block: support BDRV_REQ_ALLOCATE in passthrough drivers, Anton Nefedov, 2018/03/12
- [Qemu-devel] [PATCH v8 9/9] iotest 134: test cluster-misaligned encrypted write, Anton Nefedov, 2018/03/12
- [Qemu-devel] [PATCH v8 8/9] qcow2: skip writing zero buffers to empty COW areas, Anton Nefedov, 2018/03/12