cifs: Add support for failover in smb2_reconnect()
After a successful failover in cifs_reconnect(), the smb2_reconnect() function will make sure to reconnect every tcon to new target server. For SMB2+. Signed-off-by: Paulo Alcantara <palcantara@suse.de> Signed-off-by: Aurelien Aptel <aaptel@suse.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:

committed by
Steve French

parent
2332440714
commit
a3a53b7603
@@ -952,3 +952,20 @@ void rqst_page_get_length(struct smb_rqst *rqst, unsigned int page,
|
||||
else if (page == 0)
|
||||
*len = rqst->rq_pagesz - rqst->rq_offset;
|
||||
}
|
||||
|
||||
void extract_unc_hostname(const char *unc, const char **h, size_t *len)
|
||||
{
|
||||
const char *end;
|
||||
|
||||
/* skip initial slashes */
|
||||
while (*unc && (*unc == '\\' || *unc == '/'))
|
||||
unc++;
|
||||
|
||||
end = unc;
|
||||
|
||||
while (*end && !(*end == '\\' || *end == '/'))
|
||||
end++;
|
||||
|
||||
*h = unc;
|
||||
*len = end - unc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user