bhyve: don't flush readonly device at blockif_pause

Reviewed by:		corvink, markj
MFC after:		1 week
Sponsored by:		vStack
Differential Revision:	https://reviews.freebsd.org/D38855
This commit is contained in:
Vitaliy Gusev 2023-03-06 12:35:17 +01:00 committed by Corvin Köhne
parent 755dcd5e49
commit 5c0a031259
No known key found for this signature in database
GPG Key ID: D854DA56315E026A
1 changed files with 1 additions and 1 deletions

View File

@ -1009,7 +1009,7 @@ blockif_pause(struct blockif_ctxt *bc)
pthread_cond_wait(&bc->bc_work_done_cond, &bc->bc_mtx); pthread_cond_wait(&bc->bc_work_done_cond, &bc->bc_mtx);
pthread_mutex_unlock(&bc->bc_mtx); pthread_mutex_unlock(&bc->bc_mtx);
if (blockif_flush_bc(bc)) if (!bc->bc_rdonly && blockif_flush_bc(bc))
fprintf(stderr, "%s: [WARN] failed to flush backing file.\r\n", fprintf(stderr, "%s: [WARN] failed to flush backing file.\r\n",
__func__); __func__);
} }