• Paulo Alcantara's avatar
    cifs: document and cleanup dfs mount · 7efd0815
    Paulo Alcantara authored
    cifs_mount() for DFS mounts is for a long time way too complex to
    follow, mostly because it lacks some documentation, does a lot of
    operations like resolving DFS roots and links, checking for path
    components, perform failover, crap code, etc.
    
    Besides adding some documentation to it, do some cleanup and ensure
    that the following is implemented and supported:
    
        * non-DFS mounts
        * DFS failover
        * DFS root mounts
            - tcon and cifs_sb must contain DFS path (NOT including prefix)
            - if prefix path, then save it in cifs_sb and it must not be
    	  changed
        * DFS link mounts
          - tcon and cifs_sb must contain DFS path (including prefix)
          - if prefix path, then save it in cifs_sb and it may be changed
        * prevent recursion on broken link referrals (MAX_NESTED_LINKS)
        * check every path component of the currently resolved
          target (including prefix), and chase them accordingly
        * make sure that DFS referrals go through newly resolved root
          servers
    Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
    Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
    Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
    7efd0815
connect.c 147 KB