diff options
author | Paulo Alcantara <pc@cjr.nz> | 2022-06-03 16:13:02 -0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-06-03 14:14:58 -0500 |
commit | ef605e86821253d16d47a02ce1f766a461614fef (patch) | |
tree | 7ff5a4fd87ee6ea8f4e15dc63493c3868c09267f /fs/readdir.c | |
parent | 096c956b0d7a4a51b31ffabc1a7398a479d59307 (diff) | |
download | linux-ef605e86821253d16d47a02ce1f766a461614fef.tar.bz2 |
cifs: skip trailing separators of prefix paths
During DFS failover, prefix paths may change, so make sure to not
leave trailing separators when parsing thew in
dfs_cache_get_tgt_share(). The separators of prefix paths are already
handled by build_path_from_dentry_optional_prefix().
Consider the following DFS link:
//dom/dfs/link: [\srv1\share\dir1, \srv2\share\dir1]
Before commit:
mount.cifs //dom/dfs/link
tree connect to \\srv1\share; prefix_path=dir1
disconnect srv1; failover to srv2
tree connect to \\srv2\share; prefix_path=dir1\
mv foo bar
...
SMB2 430 Create Request File: dir1\\foo;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request
SMB2 582 Create Response File: dir1\\foo;GetInfo Response;Close Response
SMB2 430 Create Request File: dir1\\bar;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request
SMB2 286 Create Response, Error: STATUS_OBJECT_NAME_NOT_FOUND;GetInfo Response, Error: STATUS_OBJECT_NAME_NOT_FOUND;Close Response, Error: STATUS_OBJECT_NAME_NOT_FOUND
SMB2 462 Create Request File: dir1\\foo;SetInfo Request FILE_INFO/SMB2_FILE_RENAME_INFO NewName:dir1\\bar;Close Request
SMB2 478 Create Response File: dir1\\foo;SetInfo Response, Error: STATUS_OBJECT_NAME_INVALID;Close Response
After commit:
mount.cifs //dom/dfs/link
tree connect to \\srv1\share; prefix_path=dir1
disconnect srv1; failover to srv2
tree connect to \\srv2\share; prefix_path=dir1
mv foo bar
...
SMB2 430 Create Request File: dir1\foo;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request
SMB2 582 Create Response File: dir1\foo;GetInfo Response;Close Response
SMB2 430 Create Request File: dir1\bar;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request
SMB2 286 Create Response, Error: STATUS_OBJECT_NAME_NOT_FOUND;GetInfo Response, Error: STATUS_OBJECT_NAME_NOT_FOUND;Close Response, Error: STATUS_OBJECT_NAME_NOT_FOUND
SMB2 462 Create Request File: dir1\foo;SetInfo Request FILE_INFO/SMB2_FILE_RENAME_INFO NewName:dir1\bar;Close Request
SMB2 478 Create Response File: dir1\foo;SetInfo Response;Close Response
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/readdir.c')
0 files changed, 0 insertions, 0 deletions