Date: Mon, 6 Mar 2023 13:05:28 GMT From: =?utf-8?Q?Corvin=20K=C3=B6hne?= <corvink@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 5c0a03125988 - main - bhyve: don't flush readonly device at blockif_pause Message-ID: <202303061305.326D5SuS079441@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=5c0a03125988b89610f61a1bb2137b0e29d7cf31 commit 5c0a03125988b89610f61a1bb2137b0e29d7cf31 Author: Vitaliy Gusev <gusev.vitaliy@gmail.com> AuthorDate: 2023-03-06 11:35:17 +0000 Commit: Corvin Köhne <corvink@FreeBSD.org> CommitDate: 2023-03-06 13:04:07 +0000 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 --- usr.sbin/bhyve/block_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/block_if.c b/usr.sbin/bhyve/block_if.c index 53a892cbfa3a..6e47c3b7c4da 100644 --- a/usr.sbin/bhyve/block_if.c +++ b/usr.sbin/bhyve/block_if.c @@ -1009,7 +1009,7 @@ blockif_pause(struct blockif_ctxt *bc) pthread_cond_wait(&bc->bc_work_done_cond, &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", __func__); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303061305.326D5SuS079441>