diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-09-08 17:24:55 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-09-19 11:34:33 +0200 |
commit | bbb74edd405bee8cf29957ef781294f40f02d4c6 (patch) | |
tree | 21b6146ec13eb98126afebc3baf421e104d5f0da /nbd.h | |
parent | b90fb4b8f5cd01dfcf0e3b45c93977a2e3bdcc71 (diff) | |
download | qemu-bbb74edd405bee8cf29957ef781294f40f02d4c6.zip qemu-bbb74edd405bee8cf29957ef781294f40f02d4c6.tar.gz qemu-bbb74edd405bee8cf29957ef781294f40f02d4c6.tar.bz2 |
nbd: sync API definitions with upstream
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'nbd.h')
-rw-r--r-- | nbd.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -39,11 +39,20 @@ struct nbd_reply { #define NBD_FLAG_HAS_FLAGS (1 << 0) /* Flags are there */ #define NBD_FLAG_READ_ONLY (1 << 1) /* Device is read-only */ +#define NBD_FLAG_SEND_FLUSH (1 << 2) /* Send FLUSH */ +#define NBD_FLAG_SEND_FUA (1 << 3) /* Send FUA (Force Unit Access) */ +#define NBD_FLAG_ROTATIONAL (1 << 4) /* Use elevator algorithm - rotational media */ +#define NBD_FLAG_SEND_TRIM (1 << 5) /* Send TRIM (discard) */ + +#define NBD_CMD_MASK_COMMAND 0x0000ffff +#define NBD_CMD_FLAG_FUA (1 << 16) enum { NBD_CMD_READ = 0, NBD_CMD_WRITE = 1, - NBD_CMD_DISC = 2 + NBD_CMD_DISC = 2, + NBD_CMD_FLUSH = 3, + NBD_CMD_TRIM = 4 }; #define NBD_DEFAULT_PORT 10809 |