nbd: Add writethrough to block-export-add
qemu-nbd allows use of writethrough cache modes, which mean that write requests made through NBD will cause a flush before they complete. Expose the same functionality in block-export-add. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-10-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
+5
-1
@@ -216,9 +216,13 @@ BlockExport *nbd_export_create(BlockExportOptions *exp_args, Error **errp)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!exp_args->has_writethrough) {
|
||||
exp_args->writethrough = false;
|
||||
}
|
||||
|
||||
exp = nbd_export_new(bs, arg->name, arg->description, arg->bitmap,
|
||||
!arg->writable, !arg->writable,
|
||||
NULL, false, errp);
|
||||
NULL, exp_args->writethrough, errp);
|
||||
if (!exp) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user