aboutsummaryrefslogtreecommitdiff
path: root/scsi/pr-helper.h
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2017-11-08 15:57:01 -0600
committerEric Blake <eblake@redhat.com>2017-11-09 10:18:31 -0600
commit9d8f818cdee83e726a5dd14b645738ec632d2577 (patch)
treeee6c174062d82a05b12b67515223582d3a460ed4 /scsi/pr-helper.h
parentefdc0c103d7919e5cabfc0b12a5699c1f8e482db (diff)
nbd-client: Short-circuit 0-length operations
The NBD spec was recently clarified to state that clients should not send 0-length requests to the server, as the server behavior is undefined [1]. We know that qemu-nbd's behavior is a successful no-op (once it has filtered for read-only exports), but other NBD implementations might return an error. To avoid any questionable server implementations, it is better to just short-circuit such requests on the client side (we are relying on the block layer to already filter out requests such as invalid offset, write to a read-only volume, and so forth); do the short-circuit as late as possible to still benefit from protections from assertions that the block layer is not violating our assumptions. [1] https://github.com/NetworkBlockDevice/nbd/commit/ee926037 Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20171108215703.9295-6-eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Diffstat (limited to 'scsi/pr-helper.h')
0 files changed, 0 insertions, 0 deletions