• Shyam Prasad N's avatar
    cifs: handle servers that still advertise multichannel after disabling · f591062b
    Shyam Prasad N authored
    Some servers like Azure SMB servers always advertise multichannel
    capability in server capabilities list. Such servers return error
    STATUS_NOT_IMPLEMENTED for ioctl calls to query server interfaces,
    and expect clients to consider that as a sign that they do not support
    multichannel.
    
    We already handled this at mount time. Soon after the tree connect,
    we query server interfaces. And when server returned STATUS_NOT_IMPLEMENTED,
    we kept interface list as empty. When cifs_try_adding_channels gets
    called, it would not find any interfaces, so will not add channels.
    
    For the case where an active multichannel mount exists, and multichannel
    is disabled by such a server, this change will now allow the client
    to disable secondary channels on the mount. It will check the return
    status of query server interfaces call soon after a tree reconnect.
    If the return status is EOPNOTSUPP, then instead of the check to add
    more channels, we'll disable the secondary channels instead.
    
    For better code reuse, this change also moves the common code for
    disabling multichannel to a helper function.
    Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
    Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
    f591062b
smb2ops.c 161 KB