]> Git Repo - qemu.git/commit
nbd: Return correct error for write to read-only export
authorEric Blake <[email protected]>
Wed, 6 Apr 2016 03:35:02 +0000 (21:35 -0600)
committerPaolo Bonzini <[email protected]>
Thu, 7 Apr 2016 22:07:43 +0000 (00:07 +0200)
commitc0301fcc811432a587f6f94fee08d7965c1671d0
treec48b8814eebecdf284ea35b861c7f3f7028054c7
parentb3f3fdeb956a1fb866939ee1b2d8392b8f536a79
nbd: Return correct error for write to read-only export

The NBD Protocol requires that servers should send EPERM for
attempts to write (or trim) a read-only export.  We were
correct for TRIM (blk_co_discard() gave EPERM); but were
manually setting EROFS which then got mapped to EINVAL over
the wire on writes.

Signed-off-by: Eric Blake <[email protected]>
Message-Id: <1459913704[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
nbd/server.c
This page took 0.021385 seconds and 4 git commands to generate.