History

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.

Samuel Cabrero committed 5 years ago

Commit fed979a1 parent bf80e5d4 files · +116 −0Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/cifs/cifs_netlink.h+17−0
@@ -31,6 +31,9 @@ enum cifs_genl_attributes { · 30 unmodified lines
3131 CIFS_GENL_ATTR_SWN_USER_NAME,
3232 CIFS_GENL_ATTR_SWN_PASSWORD,
3333 CIFS_GENL_ATTR_SWN_DOMAIN_NAME,
34+ CIFS_GENL_ATTR_SWN_NOTIFICATION_TYPE,
35+ CIFS_GENL_ATTR_SWN_RESOURCE_STATE,
36+ CIFS_GENL_ATTR_SWN_RESOURCE_NAME,
3437 __CIFS_GENL_ATTR_MAX,
3538 };
3639 #define CIFS_GENL_ATTR_MAX (__CIFS_GENL_ATTR_MAX - 1)
@@ -39,8 +42,22 @@ enum cifs_genl_commands { · 2 unmodified lines
3942 CIFS_GENL_CMD_UNSPEC,
4043 CIFS_GENL_CMD_SWN_REGISTER,
4144 CIFS_GENL_CMD_SWN_UNREGISTER,
45+ CIFS_GENL_CMD_SWN_NOTIFY,
4246 __CIFS_GENL_CMD_MAX
4347 };
4448 #define CIFS_GENL_CMD_MAX (__CIFS_GENL_CMD_MAX - 1)
4549
50+enum cifs_swn_notification_type {
51+ CIFS_SWN_NOTIFICATION_RESOURCE_CHANGE = 0x01,
52+ CIFS_SWN_NOTIFICATION_CLIENT_MOVE = 0x02,
53+ CIFS_SWN_NOTIFICATION_SHARE_MOVE = 0x03,
54+ CIFS_SWN_NOTIFICATION_IP_CHANGE = 0x04,
55+};
56+
57+enum cifs_swn_resource_state {
58+ CIFS_SWN_RESOURCE_STATE_UNKNOWN = 0x00,
59+ CIFS_SWN_RESOURCE_STATE_AVAILABLE = 0x01,
60+ CIFS_SWN_RESOURCE_STATE_UNAVAILABLE = 0xFF
61+};
62+
4663 #endif /* _UAPILINUX_CIFS_NETLINK_H */