Re: [Qemu-devel] [PATCH v2 2/7] nbd-client: Refuse read-only client with BDRV_O_RDWR

2017-11-09 Thread Vladimir Sementsov-Ogievskiy
09.11.2017 00:56, 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 read-only, which meant we were depe

Re: [Qemu-devel] [PATCH v2 2/7] nbd-client: Refuse read-only client with BDRV_O_RDWR

2017-11-08 Thread Eric Blake
On 11/08/2017 03:56 PM, Eric Blake wrote: > Fix iotest 147 to comply with the new behavior (since nbd-server-add > defaults to a read-only export, we must tell blockdev-add to set up a > read-only client). My bad for testing only './check -nbd' and not also './check -qcow2'; iotest 58 and 140 als

[Qemu-devel] [PATCH v2 2/7] nbd-client: Refuse read-only client with BDRV_O_RDWR

2017-11-08 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 E