qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH 4/7] copy-on-read: Support refreshing filename


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH 4/7] copy-on-read: Support refreshing filename
Date: Tue, 21 Apr 2020 15:36:17 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

Some information about why we need it would be nice.

Still I see same function in commit.c, so most probably it's OK.


20.04.2020 21:36, Andrey Shinkevich wrote:
Signed-off-by: Andrey Shinkevich <address@hidden>
---
  block/copy-on-read.c | 7 +++++++
  1 file changed, 7 insertions(+)

diff --git a/block/copy-on-read.c b/block/copy-on-read.c
index ad6577d..e45eab9 100644
--- a/block/copy-on-read.c
+++ b/block/copy-on-read.c
@@ -21,6 +21,7 @@
   */
#include "qemu/osdep.h"
+#include "qemu/cutils.h"
  #include "block/block_int.h"
  #include "qemu/module.h"
@@ -141,6 +142,11 @@ static bool cor_recurse_is_first_non_filter(BlockDriverState *bs,
      return bdrv_recurse_is_first_non_filter(bs->file->bs, candidate);
  }
+static void cor_refresh_filename(BlockDriverState *bs)
+{
+    pstrcpy(bs->exact_filename, sizeof(bs->exact_filename),
+            bs->file->bs->filename);
+}
static BlockDriver bdrv_copy_on_read = {
      .format_name                        = "copy-on-read",
@@ -161,6 +167,7 @@ static BlockDriver bdrv_copy_on_read = {
      .bdrv_lock_medium                   = cor_lock_medium,
.bdrv_recurse_is_first_non_filter = cor_recurse_is_first_non_filter,
+    .bdrv_refresh_filename              = cor_refresh_filename,
.has_variable_length = true,
      .is_filter                          = true,



--
Best regards,
Vladimir



reply via email to

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