block/write-threshold: don't use write notifiers
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Thu, 6 May 2021 09:06:14 +0000 (12:06 +0300)
committerMax Reitz <mreitz@redhat.com>
Fri, 14 May 2021 14:14:10 +0000 (16:14 +0200)
commit94783301b8cb3f2b4fd871badd923fb3b9d2e7bf
tree04549f1d015e196cbefeb104ede1daf1c8ca360a
parentac4e14f5dc93d6b4bc5d4849bb61810023330380
block/write-threshold: don't use write notifiers

write-notifiers are used only for write-threshold. New code for such
purpose should create filters.

Let's better special-case write-threshold and drop write notifiers at
all. (Actually, write-threshold is special-cased anyway, as the only
user of write-notifiers)

So, create a new direct interface for bdrv_co_write_req_prepare() and
drop all write-notifier related logic from write-threshold.c.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210506090621.11848-2-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[mreitz: Adjusted comment as per Eric's suggestion]
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/io.c
block/write-threshold.c
include/block/block_int.h
include/block/write-threshold.h