diff options
Diffstat (limited to 'nbd/server.c')
-rw-r--r-- | nbd/server.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nbd/server.c b/nbd/server.c index 7af0ddffb2..98327088cb 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -2456,8 +2456,11 @@ void nbd_export_bitmap(NBDExport *exp, const char *bitmap, return; } - if (bdrv_dirty_bitmap_enabled(bm)) { - error_setg(errp, "Bitmap '%s' is enabled", bitmap); + if ((exp->nbdflags & NBD_FLAG_READ_ONLY) && bdrv_is_writable(bs) && + bdrv_dirty_bitmap_enabled(bm)) { + error_setg(errp, + "Enabled bitmap '%s' incompatible with readonly export", + bitmap); return; } |