>From d8cea729193d5607e568b3ededbcbb7c8e2e51ea Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 13 Jun 2022 21:04:34 +0100 Subject: [PATCH] Force min/opt sizes --- nbd-client.c | 2 ++ nbd-netlink.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/nbd-client.c b/nbd-client.c index c187e8c..bd1587b 100644 --- a/nbd-client.c +++ b/nbd-client.c @@ -186,6 +186,8 @@ static void netlink_configure(int index, int *sockfds, int num_connects, NLA_PUT_U32(msg, NBD_ATTR_INDEX, index); NLA_PUT_U64(msg, NBD_ATTR_SIZE_BYTES, size64); NLA_PUT_U64(msg, NBD_ATTR_BLOCK_SIZE_BYTES, blocksize); + NLA_PUT_U32(msg, NBD_ATTR_BLOCK_SIZE_MIN, 16384); + NLA_PUT_U32(msg, NBD_ATTR_BLOCK_SIZE_OPT, 65536); NLA_PUT_U64(msg, NBD_ATTR_SERVER_FLAGS, flags); if (timeout) NLA_PUT_U64(msg, NBD_ATTR_TIMEOUT, timeout); diff --git a/nbd-netlink.h b/nbd-netlink.h index fd0f4e4..9901f1b 100644 --- a/nbd-netlink.h +++ b/nbd-netlink.h @@ -31,6 +31,11 @@ enum { NBD_ATTR_SERVER_FLAGS, NBD_ATTR_CLIENT_FLAGS, NBD_ATTR_SOCKETS, + NBD_ATTR_DEAD_CONN_TIMEOUT, + NBD_ATTR_DEVICE_LIST, + NBD_ATTR_BACKEND_IDENTIFIER, + NBD_ATTR_BLOCK_SIZE_MIN, + NBD_ATTR_BLOCK_SIZE_OPT, __NBD_ATTR_MAX, }; #define NBD_ATTR_MAX (__NBD_ATTR_MAX - 1) -- 2.36.1