[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 2/9] block: drop write notifiers
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v2 2/9] block: drop write notifiers |
Date: |
Tue, 4 May 2021 11:25:46 +0300 |
They are unused now.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
include/block/block_int.h | 12 ------------
block.c | 1 -
block/io.c | 6 ------
3 files changed, 19 deletions(-)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 51f51286a5..eab352f363 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -954,9 +954,6 @@ struct BlockDriverState {
*/
int64_t total_sectors;
- /* Callback before write request is processed */
- NotifierWithReturnList before_write_notifiers;
-
/* threshold limit for writes, in bytes. "High water mark". */
uint64_t write_threshold_offset;
@@ -1083,15 +1080,6 @@ void bdrv_parse_filename_strip_prefix(const char
*filename, const char *prefix,
bool bdrv_backing_overridden(BlockDriverState *bs);
-/**
- * bdrv_add_before_write_notifier:
- *
- * Register a callback that is invoked before write requests are processed but
- * after any throttling or waiting for overlapping requests.
- */
-void bdrv_add_before_write_notifier(BlockDriverState *bs,
- NotifierWithReturn *notifier);
-
/**
* bdrv_add_aio_context_notifier:
*
diff --git a/block.c b/block.c
index 874c22c43e..e3c6c6ed93 100644
--- a/block.c
+++ b/block.c
@@ -401,7 +401,6 @@ BlockDriverState *bdrv_new(void)
for (i = 0; i < BLOCK_OP_TYPE_MAX; i++) {
QLIST_INIT(&bs->op_blockers[i]);
}
- notifier_with_return_list_init(&bs->before_write_notifiers);
qemu_co_mutex_init(&bs->reqs_lock);
qemu_mutex_init(&bs->dirty_bitmap_mutex);
bs->refcnt = 1;
diff --git a/block/io.c b/block/io.c
index 3520de51bb..1e826ba9e8 100644
--- a/block/io.c
+++ b/block/io.c
@@ -3165,12 +3165,6 @@ bool bdrv_qiov_is_aligned(BlockDriverState *bs,
QEMUIOVector *qiov)
return true;
}
-void bdrv_add_before_write_notifier(BlockDriverState *bs,
- NotifierWithReturn *notifier)
-{
- notifier_with_return_list_add(&bs->before_write_notifiers, notifier);
-}
-
void bdrv_io_plug(BlockDriverState *bs)
{
BdrvChild *child;
--
2.29.2
- [PATCH v2 1/9] block/write-threshold: don't use write notifiers, (continued)
- [PATCH v2 3/9] test-write-threshold: rewrite test_threshold_(not_)trigger tests, Vladimir Sementsov-Ogievskiy, 2021/05/04
- [PATCH v2 4/9] block/write-threshold: drop extra APIs, Vladimir Sementsov-Ogievskiy, 2021/05/04
- [PATCH v2 2/9] block: drop write notifiers,
Vladimir Sementsov-Ogievskiy <=
- [PATCH v2 6/9] test-write-threshold: drop extra tests, Vladimir Sementsov-Ogievskiy, 2021/05/04
- [PATCH v2 5/9] block/write-threshold: don't use aio context lock, Vladimir Sementsov-Ogievskiy, 2021/05/04
- [PATCH v2 7/9] test-write-threshold: drop extra TestStruct structure, Vladimir Sementsov-Ogievskiy, 2021/05/04
- [PATCH v2 8/9] test-write-threshold: drop extra includes, Vladimir Sementsov-Ogievskiy, 2021/05/04
- [PATCH v2 9/9] block/write-threshold: drop extra includes, Vladimir Sementsov-Ogievskiy, 2021/05/04