-
- new_can_write =
- !bdrv_is_read_only(bs) && !(bdrv_get_flags(bs) & BDRV_O_INACTIVE);
- if (!old_can_write && new_can_write && drv->bdrv_reopen_bitmaps_rw) {
- Error *local_err = NULL;
- if (drv->bdrv_reopen_bitmaps_rw(bs, &local_err) < 0) {
- /* This is not fatal, bitmaps just left read-only, so all following
- * writes will fail. User can remove read-only bitmaps to unblock
- * writes.
- */
- error_reportf_err(local_err,
- "%s: Failed to make dirty bitmaps writable: ",
- bdrv_get_node_name(bs));
- }
- }