]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - include/uapi/linux/nbd-netlink.h
nbd: only clear the queue on device teardown
[mirror_ubuntu-focal-kernel.git] / include / uapi / linux / nbd-netlink.h
CommitLineData
e46c7287
JB
1/*
2 * Copyright (C) 2017 Facebook. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public
14 * License along with this program; if not, write to the
15 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 * Boston, MA 021110-1307, USA.
17 */
18#ifndef _UAPILINUX_NBD_NETLINK_H
19#define _UAPILINUX_NBD_NETLINK_H
20
799f9a38
JB
21#define NBD_GENL_FAMILY_NAME "nbd"
22#define NBD_GENL_VERSION 0x1
23#define NBD_GENL_MCAST_GROUP_NAME "nbd_mc_group"
e46c7287
JB
24
25/* Configuration policy attributes, used for CONNECT */
26enum {
27 NBD_ATTR_UNSPEC,
28 NBD_ATTR_INDEX,
29 NBD_ATTR_SIZE_BYTES,
30 NBD_ATTR_BLOCK_SIZE_BYTES,
31 NBD_ATTR_TIMEOUT,
32 NBD_ATTR_SERVER_FLAGS,
33 NBD_ATTR_CLIENT_FLAGS,
34 NBD_ATTR_SOCKETS,
35 __NBD_ATTR_MAX,
36};
37#define NBD_ATTR_MAX (__NBD_ATTR_MAX - 1)
38
39/*
40 * This is the format for multiple sockets with NBD_ATTR_SOCKETS
41 *
42 * [NBD_ATTR_SOCKETS]
43 * [NBD_SOCK_ITEM]
44 * [NBD_SOCK_FD]
45 * [NBD_SOCK_ITEM]
46 * [NBD_SOCK_FD]
47 */
48enum {
49 NBD_SOCK_ITEM_UNSPEC,
50 NBD_SOCK_ITEM,
51 __NBD_SOCK_ITEM_MAX,
52};
53#define NBD_SOCK_ITEM_MAX (__NBD_SOCK_ITEM_MAX - 1)
54
55enum {
56 NBD_SOCK_UNSPEC,
57 NBD_SOCK_FD,
58 __NBD_SOCK_MAX,
59};
60#define NBD_SOCK_MAX (__NBD_SOCK_MAX - 1)
61
62enum {
63 NBD_CMD_UNSPEC,
64 NBD_CMD_CONNECT,
65 NBD_CMD_DISCONNECT,
b7aa3d39 66 NBD_CMD_RECONFIGURE,
799f9a38 67 NBD_CMD_LINK_DEAD,
e46c7287
JB
68 __NBD_CMD_MAX,
69};
70#define NBD_CMD_MAX (__NBD_CMD_MAX - 1)
71
72#endif /* _UAPILINUX_NBD_NETLINK_H */