summaryrefslogtreecommitdiffstats
path: root/nbd
diff options
context:
space:
mode:
authorKevin Wolf2020-09-24 17:27:11 +0200
committerKevin Wolf2020-10-02 15:46:40 +0200
commit30dbc81d310cc5c78589ab689083371c4bfced1f (patch)
tree7e34f866a97b898cc010c72031b2ad99f945319c /nbd
parentblock/export: Add query-block-exports (diff)
downloadqemu-30dbc81d310cc5c78589ab689083371c4bfced1f.tar.gz
qemu-30dbc81d310cc5c78589ab689083371c4bfced1f.tar.xz
qemu-30dbc81d310cc5c78589ab689083371c4bfced1f.zip
block/export: Move writable to BlockExportOptions
The 'writable' option is a basic option that will probably be applicable to most if not all export types that we will implement. Move it from NBD to the generic BlockExport layer. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-26-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'nbd')
-rw-r--r--nbd/server.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/nbd/server.c b/nbd/server.c
index 6c8532de23..465ec9e762 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -1530,11 +1530,6 @@ int nbd_export_new(BlockExport *blk_exp,
/* Don't allow resize while the NBD server is running, otherwise we don't
* care what happens with the node. */
blk_get_perm(blk, &perm, &shared_perm);
-
- if (!readonly) {
- perm |= BLK_PERM_WRITE;
- }
-
ret = blk_set_perm(blk, perm, shared_perm & ~BLK_PERM_RESIZE, errp);
if (ret < 0) {
return ret;