]> git.ipfire.org Git - thirdparty/linux.git/commit - fs/cifs/cifsproto.h
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)
commitbacd704a95ad0b93af995aae4a523aa046f46563
treefbe17abf0e060fa43bb31412b882c0ea8e989679
parentffdec8d64291c5d2e61da96cc64fbb57469fd5cf
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