On 5/12/2018 3:43 PM, Vladimir Sementsov-Ogievskiy wrote: > Could you please write, what is the behavior change and why here? >
The idea is that passthrough drivers should report the flags if there are no obstacles to support it. Technically, these changes are not connected to this series, but since BDRV_REQ_ALLOCATE flag is added, so we might want to expose it where possible. > Is it a bug, that FUA was not inherited before? > I don't think it's a bug really since there is a fallback path in block/io.c. > 03.12.2018 13:14, Anton Nefedov wrote: >> Signed-off-by: Anton Nefedov <anton.nefe...@virtuozzo.com> >> --- >> block/mirror.c | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/block/mirror.c b/block/mirror.c >> index 56d9ef7474..56908c9b19 100644 >> --- a/block/mirror.c >> +++ b/block/mirror.c >> @@ -1528,8 +1528,12 @@ static void mirror_start_job(const char *job_id, >> BlockDriverState *bs, >> mirror_top_bs->implicit = true; >> } >> mirror_top_bs->total_sectors = bs->total_sectors; >> - mirror_top_bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED; >> - mirror_top_bs->supported_zero_flags = BDRV_REQ_WRITE_UNCHANGED; >> + mirror_top_bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED | >> + (BDRV_REQ_FUA & bs->supported_write_flags); >> + mirror_top_bs->supported_zero_flags = BDRV_REQ_WRITE_UNCHANGED | >> + ((BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP) >> + & bs->supported_zero_flags); >> + >> bs_opaque = g_new0(MirrorBDSOpaque, 1); >> mirror_top_bs->opaque = bs_opaque; >> bdrv_set_aio_context(mirror_top_bs, bdrv_get_aio_context(bs)); >> > >