[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/23] block: Make bdrv_can_set_read_only() static
From: |
Kevin Wolf |
Subject: |
[PATCH 01/23] block: Make bdrv_can_set_read_only() static |
Date: |
Fri, 3 Feb 2023 16:21:40 +0100 |
It is never called outside of block.c.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
include/block/block-io.h | 2 --
block.c | 4 ++--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/block/block-io.h b/include/block/block-io.h
index 614cbd7eda..f9fa88204d 100644
--- a/include/block/block-io.h
+++ b/include/block/block-io.h
@@ -134,8 +134,6 @@ int bdrv_is_allocated_above(BlockDriverState *top,
BlockDriverState *base,
int coroutine_fn bdrv_co_is_zero_fast(BlockDriverState *bs, int64_t offset,
int64_t bytes);
-int bdrv_can_set_read_only(BlockDriverState *bs, bool read_only,
- bool ignore_allow_rdw, Error **errp);
int bdrv_apply_auto_read_only(BlockDriverState *bs, const char *errmsg,
Error **errp);
bool bdrv_is_read_only(BlockDriverState *bs);
diff --git a/block.c b/block.c
index 122aa9a9ac..c2a8d66f75 100644
--- a/block.c
+++ b/block.c
@@ -277,8 +277,8 @@ bool bdrv_is_read_only(BlockDriverState *bs)
return !(bs->open_flags & BDRV_O_RDWR);
}
-int bdrv_can_set_read_only(BlockDriverState *bs, bool read_only,
- bool ignore_allow_rdw, Error **errp)
+static int bdrv_can_set_read_only(BlockDriverState *bs, bool read_only,
+ bool ignore_allow_rdw, Error **errp)
{
IO_CODE();
--
2.38.1
- [PATCH 00/23] block: Lock the graph, part 2 (BlockDriver callbacks), Kevin Wolf, 2023/02/03
- [PATCH 02/23] mirror: Fix access of uninitialised fields during start, Kevin Wolf, 2023/02/03
- [PATCH 01/23] block: Make bdrv_can_set_read_only() static,
Kevin Wolf <=
- [PATCH 03/23] block: Mark bdrv_co_truncate() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/02/03
- [PATCH 04/23] block: Mark bdrv_co_block_status() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/02/03
- [PATCH 06/23] block/qed: add missing graph rdlock in qed_need_check_timer_entry, Kevin Wolf, 2023/02/03
- [PATCH 05/23] block: Mark bdrv_co_ioctl() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/02/03
- [PATCH 08/23] block: Mark bdrv_co_pdiscard() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/02/03
- [PATCH 09/23] block: Mark bdrv_co_pwrite_zeroes() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/02/03
- [PATCH 10/23] block: Mark read/write in block/io.c GRAPH_RDLOCK, Kevin Wolf, 2023/02/03
- [PATCH 12/23] block: Mark bdrv_co_pwrite_sync() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/02/03
- [PATCH 07/23] block: Mark bdrv_co_flush() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/02/03