block: Disable BDRV_O_COPY_ON_READ for the backing file
Since commit 0ebd24e0, bdrv_open_common will throw an error when trying to open a file read-only with the BDRV_O_COPY_ON_READ flag set. Although BDRV_O_RDWR is unset for the backing files, BDRV_O_COPY_ON_READ is still passed on if copy-on-read was requested for the drive. Let's unset this flag too before opening the backing file, or bdrv_open_common will fail. Signed-off-by: NThibaut LAURENT <thibaut.laurent@gmail.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net> Reviewed-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
Showing
想要评论请 注册 或 登录