block: use bdrv_add_before_write_notifier
PATCH 1/1 block: use bdrv_add_before_write_notifier
Register the notifier using the specific API for block devices.
Signed-off-by Paolo Bonzini <[email protected]>
--- block/write-threshold.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
block/write-threshold.c +1 -2
@@ -76,8 +76,7 @@ static int coroutine_fn before_write_notify(NotifierWithReturn *notifier,static void write_threshold_register_notifier (BlockDriverState *bs) { bs->write_threshold_notifier.notify = before_write_notify; -notifier_with_return_list_add (&bs->before_write_notifiers, - &bs->write_threshold_notifier); +bdrv_add_before_write_notifier (bs, &bs->write_threshold_notifier); } static void write_threshold_update(BlockDriverState *bs,
Signature · 1 line
2.7.4
Quoted 6 lines · Paolo Bonzini
Register the notifier using the specific API for block devices.
Signed-off-by Paolo Bonzini <[email protected]>--- block/write-threshold.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Reviewed-by Eric Blake <[email protected]>
Quoted 16 lines
block/write-threshold.c +1
-2@@ -76,8 +76,7 @@ static int coroutine_fn before_write_notify(NotifierWithReturn *notifier,static void write_threshold_register_notifier (BlockDriverState *bs) { bs->write_threshold_notifier.notify = before_write_notify; -notifier_with_return_list_add (&bs->before_write_notifiers, - &bs->write_threshold_notifier); +bdrv_add_before_write_notifier (bs, &bs->write_threshold_notifier); } static void write_threshold_update(BlockDriverState *bs,
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Kevin Wolf
AppliedAm 04.10.2016 um 10:49 hat Paolo Bonzini geschrieben:
Quoted 3 lines
Register the notifier using the specific API for block devices.
Signed-off-by Paolo Bonzini <[email protected]>
Thanks, applied to the block branch.
Kevin
Quoted 6 lines · Paolo Bonzini
Register the notifier using the specific API for block devices.
Signed-off-by Paolo Bonzini <[email protected]>--- block/write-threshold.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Reviewed-by Stefan Hajnoczi <[email protected]>