mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
nbd-server: Use a separate BlockBackend
The builtin NBD server uses its own BlockBackend now instead of reusing the monitor/guest device one. This means that it has its own writethrough setting now. The builtin NBD server always uses writeback caching now regardless of whether the guest device has WCE enabled. qemu-nbd respects the cache mode given on the command line. We still need to keep a reference to the monitor BB because we put an eject notifier on it, but we don't use it for any I/O. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
0524e93a3f
commit
cd7fca952c
5 changed files with 28 additions and 10 deletions
|
@ -910,8 +910,8 @@ int main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
exp = nbd_export_new(blk, dev_offset, fd_size, nbdflags, nbd_export_closed,
|
||||
&local_err);
|
||||
exp = nbd_export_new(bs, dev_offset, fd_size, nbdflags, nbd_export_closed,
|
||||
writethrough, NULL, &local_err);
|
||||
if (!exp) {
|
||||
error_report_err(local_err);
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue