]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: handle prefix paths in reconnect
authorPaulo Alcantara (SUSE) <pc@cjr.nz>
Thu, 20 Feb 2020 22:49:34 +0000 (19:49 -0300)
committerSteve French <stfrench@microsoft.com>
Mon, 23 Mar 2020 03:49:09 +0000 (22:49 -0500)
commit9ce6cd03f6c83fab6bc7a3bef650ac1a72dfd963
treefbe17abf0e060fa43bb31412b882c0ea8e989679
parentd63359662df2fc6bed26f563980a20861f3c8650
cifs: handle prefix paths in reconnect

For the case where we have a DFS path like below and we're currently
connected to targetA:

    //dfsroot/link -> //targetA/share/foo, //targetB/share/bar

after failover, we should make sure to update cifs_sb->prepath so the
next operations will use the new prefix path "/bar".

Besides, in order to simplify the use of different prefix paths,
enforce CIFS_MOUNT_USE_PREFIX_PATH for DFS mounts so we don't have to
revalidate the root dentry every time we set a new prefix path.

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsproto.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/dfs_cache.c
fs/cifs/dfs_cache.h
fs/cifs/misc.c
fs/cifs/smb2pdu.c