[Qemu-devel] [PATCH v7 for-2.12 25/25] block/null: Generate filename even with latency-ns

Max Reitz posted 25 patches 8 years, 2 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v7 for-2.12 25/25] block/null: Generate filename even with latency-ns
Posted by Max Reitz 8 years, 2 months ago
While we cannot represent the latency-ns option in a filename, it is not
a significant option so not being able to should not stop us from
generating a filename nonetheless.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 block/null.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/null.c b/block/null.c
index 65f5d681c0..ca0aa3d528 100644
--- a/block/null.c
+++ b/block/null.c
@@ -250,7 +250,8 @@ static void null_refresh_filename(BlockDriverState *bs)
     {
         /* These options can be ignored */
         if (strcmp(qdict_entry_key(e), "filename") &&
-            strcmp(qdict_entry_key(e), "driver"))
+            strcmp(qdict_entry_key(e), "driver") &&
+            strcmp(qdict_entry_key(e), NULL_OPT_LATENCY))
         {
             return;
         }
-- 
2.13.6


Re: [Qemu-devel] [PATCH v7 for-2.12 25/25] block/null: Generate filename even with latency-ns
Posted by Alberto Garcia 8 years, 2 months ago
On Mon 20 Nov 2017 09:10:04 PM CET, Max Reitz wrote:
> While we cannot represent the latency-ns option in a filename, it is not
> a significant option so not being able to should not stop us from
> generating a filename nonetheless.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>

Reviewed-by: Alberto Garcia <berto@igalia.com>

Berto