smb3: add dynamic trace point for session setup key expired failures
authorSteve French <stfrench@microsoft.com>
Fri, 26 Jul 2024 06:06:20 +0000 (01:06 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 26 Jul 2024 17:34:50 +0000 (12:34 -0500)
commitb6f6a7aa689f1c255e06fee3ca13c9f9e5c12780
treee54a776245944cc8bfc6f98f7dd6d412b164712b
parent6629f87b97e0740431b7b29b8dfdfa9d842c4bc5
smb3: add dynamic trace point for session setup key expired failures

There are cases where services need to remount (or change their
credentials files) when keys have expired, but it can be helpful
to have a dynamic trace point to make it easier to notify the
service to refresh the storage account key.

Here is sample output, one from mount with bad password, one
from a reconnect where the password has been changed or expired
and reconnect fails (requiring remount with new storage account key)

       TASK-PID     CPU#  |||||  TIMESTAMP  FUNCTION
          | |         |   |||||     |         |

  mount.cifs-11362  [000] .....  6000.241620: smb3_key_expired:
    rc=-13 user=testpassu conn_id=0x2 server=localhost addr=127.0.0.1:445
  kworker/4:0-8458  [004] .....  6044.892283: smb3_key_expired:
    rc=-13 user=testpassu conn_id=0x3 server=localhost addr=127.0.0.1:445

Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb2pdu.c
fs/smb/client/trace.h