Commit 818bbc86 authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Kevin Wolf
Browse files

block: use bdrv_add_before_write_notifier



Register the notifier using the specific API for block devices.

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent e902754e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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,