Skip to content

Make IPC a regular tcon and fix SMB2 domain-based DFS

Aurelien Aptel linux-cifs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 3 repliesIn review
  2. v22 patches 2 repliesSuperseded
  3. v13 patches 5 repliesSuperseded

Changes in v3 from the cover letter

* rebased against Steve's for-next
* mark IPC tcon for reconnection like other tcons
* dump IPC tcon in /proc DebugData
* pass IPC tcon instead of NULL to smb_init() in CIFSGetDFSRefer() so that it reconnect it if needed

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3CIFS: make IPC a regular tconfs/cifs/cifsglob.h fs/cifs/cifssmb.c fs/cifs/connect.c +2 more+133 -761 reply
2/3CIFS: use tcon_ipc instead of use_ipc parameter of SMB2_ioctlfs/cifs/smb2file.c fs/cifs/smb2ops.c fs/cifs/smb2pdu.c +1 more+25 -371 reply
3/3CIFS: dump IPC tcon in debug proc filefs/cifs/cifs_debug.c+35 -261 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchPavel Shilovsky
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] Make IPC a regular tcon and fix SMB2 domain-based DFS

changes since v2:

* rebased against Steve's for-next
* mark IPC tcon for reconnection like other tcons
* dump IPC tcon in /proc DebugData
* pass IPC tcon instead of NULL to smb_init() in CIFSGetDFSRefer() so that it reconnect it if needed

passes make C=1, checkpatch.pl, and reconnection works in these cases (domain-based DFS with Windows Server 2016):

| test                      | v1.0 | v3.0 |
|---------------------------+------+------|
| mount root, reco, cd link |  ok  |  ok  |
| mount link, reco, ls      |  ok  |  ok  |

changes since v1:

* squashed definition change of SERVER_NAME_LENGTH in first patch
* ipc tcon no longer added the the session tcon list
* ipc tcon no longer protected by spinlock
* decrement tcon refcount only if it was incremented earlier (ie not an ipc tcon) in smb2_get_dfs_refer()

Aurelien Aptel (3):
CIFS: make IPC a regular tcon
CIFS: use tcon_ipc instead of use_ipc parameter of SMB2_ioctl
CIFS: dump IPC tcon in debug proc file

 fs/cifs/cifs_debug.c |  61 ++++++++++++---------
 fs/cifs/cifsglob.h   |  14 ++---
 fs/cifs/cifssmb.c    |   7 +--
 fs/cifs/connect.c    | 150 ++++++++++++++++++++++++++++++++++++++-------------
 fs/cifs/inode.c      |   2 +-
 fs/cifs/smb2file.c   |   2 +-
 fs/cifs/smb2ops.c    |  53 ++++++++----------
 fs/cifs/smb2pdu.c    |  40 ++++----------
 fs/cifs/smb2proto.h  |   3 +-
 9 files changed, 193 insertions(+), 139 deletions(-)
Signature · 1 line
2.12.3