]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: support share failover when remounting
authorPaulo Alcantara <pc@cjr.nz>
Fri, 16 Jul 2021 06:26:41 +0000 (03:26 -0300)
committerSteve French <stfrench@microsoft.com>
Thu, 22 Jul 2021 16:43:23 +0000 (11:43 -0500)
commit5b407de647a4d25ffea9ee80f3f8ad753acfd6b9
tree89872d334ee61e3751fe03e4d7f0f5ea4389ce16
parent6142894dc5131aaced33213ec6d91a3b2d1a6d19
cifs: support share failover when remounting

When remouting a DFS share, force a new DFS referral of the path and
if the currently cached targets do not match any of the new targets or
there was no cached targets, then mark it for reconnect.

For example:

    $ mount //dom/dfs/link /mnt -o username=foo,password=bar
    $ ls /mnt
    oldfile.txt

    change target share of 'link' in server settings

    $ mount /mnt -o remount,username=foo,password=bar
    $ ls /mnt
    newfile.txt

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c
fs/cifs/dfs_cache.c
fs/cifs/dfs_cache.h
fs/cifs/fs_context.c