Patchwork [PULL,13/31] block: Remove BDRV_O_COPY_ON_READ for bs->file

login
register
mail settings
Submitter Kevin Wolf
Date April 30, 2014, 6:23 p.m.
Message ID <1398882243-14783-14-git-send-email-kwolf@redhat.com>
Download mbox | patch
Permalink /patch/344284/
State New
Headers show

Comments

Kevin Wolf - April 30, 2014, 6:23 p.m.
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 <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
 block.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/block.c b/block.c
index c6d5ab9..9f88bcc 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;
 }