nbd: change error checking order for bitmaps
authorJohn Snow <jsnow@redhat.com>
Tue, 12 Mar 2019 16:05:48 +0000 (12:05 -0400)
committerJohn Snow <jsnow@redhat.com>
Tue, 12 Mar 2019 16:05:48 +0000 (12:05 -0400)
commit3b78a92776bf1199b6864f2f38d9d341fb741f36
tree50d7ec82fc652efa93dc9bc51e1b1c9db6d63c57
parent8b2e20f64f25a5bf9a7cd45b4babdf2d7416f7ad
nbd: change error checking order for bitmaps

Check that the bitmap is not in use prior to it checking if it is
not enabled/recording guest writes. The bitmap being busy was likely
at the behest of the user, so this error has a greater chance of being
understood by the user.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20190223000614.13894-6-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
nbd/server.c