summaryrefslogtreecommitdiff
path: root/include/uapi/linux/nbd.h
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2016-11-22 22:04:40 +0300
committerJens Axboe <axboe@fb.com>2016-11-22 22:16:32 +0300
commit9561a7ade0c205bc2ee035a2ac880478dcc1a024 (patch)
tree3c638cde9063a2461b9767ec626b4359445c662a /include/uapi/linux/nbd.h
parente00f4f4d0ff7e13b9115428a245b49108d625f09 (diff)
downloadlinux-9561a7ade0c205bc2ee035a2ac880478dcc1a024.tar.xz
nbd: add multi-connection support
NBD can become contended on its single connection. We have to serialize all writes and we can only process one read response at a time. Fix this by allowing userspace to provide multiple connections to a single nbd device. This coupled with block-mq drastically increases performance in multi-process cases. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/uapi/linux/nbd.h')
-rw-r--r--include/uapi/linux/nbd.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/uapi/linux/nbd.h b/include/uapi/linux/nbd.h
index e08e413d5f71..f063cff178c5 100644
--- a/include/uapi/linux/nbd.h
+++ b/include/uapi/linux/nbd.h
@@ -38,11 +38,12 @@ enum {
};
/* values for flags field */
-#define NBD_FLAG_HAS_FLAGS (1 << 0) /* nbd-server supports flags */
-#define NBD_FLAG_READ_ONLY (1 << 1) /* device is read-only */
-#define NBD_FLAG_SEND_FLUSH (1 << 2) /* can flush writeback cache */
+#define NBD_FLAG_HAS_FLAGS (1 << 0) /* nbd-server supports flags */
+#define NBD_FLAG_READ_ONLY (1 << 1) /* device is read-only */
+#define NBD_FLAG_SEND_FLUSH (1 << 2) /* can flush writeback cache */
/* there is a gap here to match userspace */
-#define NBD_FLAG_SEND_TRIM (1 << 5) /* send trim/discard */
+#define NBD_FLAG_SEND_TRIM (1 << 5) /* send trim/discard */
+#define NBD_FLAG_CAN_MULTI_CONN (1 << 7) /* Server supports multiple connections per export. */
/* userspace doesn't need the nbd_device structure */