diff options
author | Kevin Wolf <kwolf@redhat.com> | 2020-09-24 17:27:11 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-10-02 15:46:40 +0200 |
commit | 30dbc81d310cc5c78589ab689083371c4bfced1f (patch) | |
tree | 7e34f866a97b898cc010c72031b2ad99f945319c /nbd | |
parent | 8cade320c8838952b5f589c6df26b2e62dd099d7 (diff) | |
download | qemu-30dbc81d310cc5c78589ab689083371c4bfced1f.zip qemu-30dbc81d310cc5c78589ab689083371c4bfced1f.tar.gz qemu-30dbc81d310cc5c78589ab689083371c4bfced1f.tar.bz2 |
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 6c8532d..465ec9e 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; |