[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-7.2] block/blkio: Set BlockDriver::has_variable_length to fal
From: |
Alberto Faria |
Subject: |
[PATCH for-7.2] block/blkio: Set BlockDriver::has_variable_length to false |
Date: |
Tue, 8 Nov 2022 14:44:33 +0000 |
Setting it to true can cause the device size to be queried from libblkio
in otherwise fast paths, degrading performance. Set it to false and
require users to refresh the device size explicitly instead.
Fixes: 4c8f4fda0504 ("block/blkio: Tolerate device size changes")
Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Alberto Faria <afaria@redhat.com>
---
block/blkio.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/block/blkio.c b/block/blkio.c
index 620fab28a7..5eae3adfaf 100644
--- a/block/blkio.c
+++ b/block/blkio.c
@@ -993,7 +993,6 @@ static void blkio_refresh_limits(BlockDriverState *bs,
Error **errp)
{ \
.format_name = name, \
.protocol_name = name, \
- .has_variable_length = true, \
.instance_size = sizeof(BDRVBlkioState), \
.bdrv_file_open = blkio_file_open, \
.bdrv_close = blkio_close, \
--
2.38.1
- [PATCH for-7.2] block/blkio: Set BlockDriver::has_variable_length to false,
Alberto Faria <=