diff options
author | Kevin Wolf | 2020-09-24 17:27:11 +0200 |
---|---|---|
committer | Kevin Wolf | 2020-10-02 15:46:40 +0200 |
commit | 30dbc81d310cc5c78589ab689083371c4bfced1f (patch) | |
tree | 7e34f866a97b898cc010c72031b2ad99f945319c /nbd | |
parent | block/export: Add query-block-exports (diff) | |
download | qemu-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.c | 5 |
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; |