From: Kevin Wolf Date: Fri, 11 Apr 2014 19:36:45 +0000 (+0200) Subject: block: Remove BDRV_O_COPY_ON_READ for bs->file X-Git-Tag: pull-nvme-20200902~4830^2~18 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5669b44de5b3b607a3a4749e0c8c5ddfd723e76b;p=qemu-nvme.git block: Remove BDRV_O_COPY_ON_READ for bs->file Copy on Read makes sense on the format level where backing files are implemented, but it's not required on the protocol level. While it shouldn't actively break anything to have COR enabled on both layers, needless serialisation and allocation checks may impact performance. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- diff --git a/block.c b/block.c index c6d5ab9cb8..9f88bcc088 100644 --- a/block.c +++ b/block.c @@ -793,7 +793,7 @@ static int bdrv_inherited_flags(int flags) } /* Clear flags that only apply to the top layer */ - flags &= ~(BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING); + flags &= ~(BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING | BDRV_O_COPY_ON_READ); return flags; }