Re: [Qemu-devel] [PULL 3/8] nbd-client: Refuse read-only client with BDRV_O_RDWR

2017-12-03 Thread Richard W.M. Jones
On Thu, Nov 09, 2017 at 10:59:34AM -0600, Eric Blake wrote: > The NBD spec says that clients should not try to write/trim to > an export advertised as read-only by the server. But we failed > to check that, and would allow the block layer to use NBD with > BDRV_O_RDWR even when the server is

[Qemu-devel] [PULL 3/8] nbd-client: Refuse read-only client with BDRV_O_RDWR

2017-11-09 Thread Eric Blake
The NBD spec says that clients should not try to write/trim to an export advertised as read-only by the server. But we failed to check that, and would allow the block layer to use NBD with BDRV_O_RDWR even when the server is read-only, which meant we were depending on the server sending a proper