summaryrefslogtreecommitdiff
path: root/include/uapi/linux/cifs
diff options
context:
space:
mode:
authorSamuel Cabrero <scabrero@suse.de>2020-11-30 19:02:52 +0100
committerSteve French <stfrench@microsoft.com>2020-12-14 09:16:22 -0600
commitfed979a7e082bd9f25f9002c3c4f8740dacd0bc8 (patch)
tree7a5bb9d692c7a2a55db42200268fc0d7859e73fd /include/uapi/linux/cifs
parentbf80e5d4259a192d6b06ae17e79a5e9dab48bf51 (diff)
cifs: Set witness notification handler for messages from userspace daemon
+ Set a handler for the witness notification messages received from the userspace daemon. + Handle the resource state change notification. When the resource becomes unavailable or available set the tcp status to CifsNeedReconnect for all channels. Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Aurelien Aptel <aaptel@suse.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'include/uapi/linux/cifs')
-rw-r--r--include/uapi/linux/cifs/cifs_netlink.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/uapi/linux/cifs/cifs_netlink.h b/include/uapi/linux/cifs/cifs_netlink.h
index 5662e2774513..da3107582f49 100644
--- a/include/uapi/linux/cifs/cifs_netlink.h
+++ b/include/uapi/linux/cifs/cifs_netlink.h
@@ -31,6 +31,9 @@ enum cifs_genl_attributes {
CIFS_GENL_ATTR_SWN_USER_NAME,
CIFS_GENL_ATTR_SWN_PASSWORD,
CIFS_GENL_ATTR_SWN_DOMAIN_NAME,
+ CIFS_GENL_ATTR_SWN_NOTIFICATION_TYPE,
+ CIFS_GENL_ATTR_SWN_RESOURCE_STATE,
+ CIFS_GENL_ATTR_SWN_RESOURCE_NAME,
__CIFS_GENL_ATTR_MAX,
};
#define CIFS_GENL_ATTR_MAX (__CIFS_GENL_ATTR_MAX - 1)
@@ -39,8 +42,22 @@ enum cifs_genl_commands {
CIFS_GENL_CMD_UNSPEC,
CIFS_GENL_CMD_SWN_REGISTER,
CIFS_GENL_CMD_SWN_UNREGISTER,
+ CIFS_GENL_CMD_SWN_NOTIFY,
__CIFS_GENL_CMD_MAX
};
#define CIFS_GENL_CMD_MAX (__CIFS_GENL_CMD_MAX - 1)
+enum cifs_swn_notification_type {
+ CIFS_SWN_NOTIFICATION_RESOURCE_CHANGE = 0x01,
+ CIFS_SWN_NOTIFICATION_CLIENT_MOVE = 0x02,
+ CIFS_SWN_NOTIFICATION_SHARE_MOVE = 0x03,
+ CIFS_SWN_NOTIFICATION_IP_CHANGE = 0x04,
+};
+
+enum cifs_swn_resource_state {
+ CIFS_SWN_RESOURCE_STATE_UNKNOWN = 0x00,
+ CIFS_SWN_RESOURCE_STATE_AVAILABLE = 0x01,
+ CIFS_SWN_RESOURCE_STATE_UNAVAILABLE = 0xFF
+};
+
#endif /* _UAPILINUX_CIFS_NETLINK_H */