nbd/server: introduce NBD_CMD_CACHE

Handle nbd CACHE command. Just do read, without sending read data back.
Cache mechanism should be done by exported node driver chain.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20180413143156.11409-1-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[eblake: fix two missing case labels in switch statements]
Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Vladimir Sementsov-Ogievskiy 2018-04-13 17:31:56 +03:00 committed by Eric Blake
parent 3229a835a3
commit bc37b06a5c
3 changed files with 11 additions and 5 deletions

View file

@ -148,6 +148,8 @@ const char *nbd_cmd_lookup(uint16_t cmd)
return "flush";
case NBD_CMD_TRIM:
return "trim";
case NBD_CMD_CACHE:
return "cache";
case NBD_CMD_WRITE_ZEROES:
return "write zeroes";
case NBD_CMD_BLOCK_STATUS: