qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v12 11/14] copy-on-read: add support for read flags to COR-fi


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v12 11/14] copy-on-read: add support for read flags to COR-filter
Date: Tue, 27 Oct 2020 17:46:41 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

22.10.2020 21:13, Andrey Shinkevich wrote:
Add the BDRV_REQ_COPY_ON_READ and BDRV_REQ_PREFETCH flags to the
supported_read_flags of the COR-filter.

Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
---
  block/copy-on-read.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/block/copy-on-read.c b/block/copy-on-read.c
index 8178a91..a2b180a 100644
--- a/block/copy-on-read.c
+++ b/block/copy-on-read.c
@@ -50,6 +50,8 @@ static int cor_open(BlockDriverState *bs, QDict *options, int 
flags,
          return -EINVAL;
      }
+ bs->supported_read_flags = BDRV_REQ_COPY_ON_READ | BDRV_REQ_PREFETCH;
+
      bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED |
          (BDRV_REQ_FUA & bs->file->bs->supported_write_flags);

This should be merged with the following patch, otherwise it doesn't make 
sense. You mark filter as supporting PREFETCH, but actually it just ignores it 
(and may crash on trying to read into qiov=NULL).

--
Best regards,
Vladimir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]