<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/smb/client/trace.h, branch linux-7.1.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-04-14T18:04:21+00:00</updated>
<entry>
<title>smb: client: add tracepoints for deferred handle caching</title>
<updated>2026-04-14T18:04:21+00:00</updated>
<author>
<name>Bharath SM</name>
<email>bharathsm@microsoft.com</email>
</author>
<published>2026-04-14T16:18:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=abce65948c2cd9f4d36ea0a57e79b9885b9801c6'/>
<id>urn:sha1:abce65948c2cd9f4d36ea0a57e79b9885b9801c6</id>
<content type='text'>
Add tracepoints to observe handle caching behavior.

smb3_open_cached: emitted when an open reuses a cached handle from
a previous deferred close, avoiding a network round-trip

smb3_close_cached: emitted when a close is deferred (handle cached
for potential reuse by subsequent opens)

Signed-off-by: Bharath SM &lt;bharathsm@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: add oplock level to smb3_open_done tracepoint</title>
<updated>2026-04-14T18:04:21+00:00</updated>
<author>
<name>Bharath SM</name>
<email>bharathsm@microsoft.com</email>
</author>
<published>2026-04-14T16:18:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4c46b677f352dc480b8a19ea198146eac0c60f9e'/>
<id>urn:sha1:4c46b677f352dc480b8a19ea198146eac0c60f9e</id>
<content type='text'>
Add an oplock field to the smb3_open_done_class trace event to
show the granted oplock/lease level. Move the trace_smb3_open_done
call after smb2_parse_contexts() so the oplock value reflects
the parsed lease state (R/W/H flags).

Signed-off-by: Bharath SM &lt;bharathsm@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: add tracepoint for local lock conflicts</title>
<updated>2026-04-14T18:04:21+00:00</updated>
<author>
<name>Bharath SM</name>
<email>bharathsm@microsoft.com</email>
</author>
<published>2026-04-14T16:18:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=afab3f61aeb19693109e8a71028c7b0c8088f452'/>
<id>urn:sha1:afab3f61aeb19693109e8a71028c7b0c8088f452</id>
<content type='text'>
Add smb3_lock_conflict tracepoint that fires when a byte-range
lock request conflicts with an existing cached lock. This helps
debug lock contention issues when locks are cached locally due
to oplocks/leases.

The trace includes both the requested and conflicting lock details:
- Requested: offset, length, type
- Conflicting: offset, length, type, pid (lock holder)

Signed-off-by: Bharath SM &lt;bharathsm@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: add tracepoints for lock operations</title>
<updated>2026-04-14T18:04:21+00:00</updated>
<author>
<name>Bharath SM</name>
<email>bharathsm@microsoft.com</email>
</author>
<published>2026-04-14T16:18:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eb4d3691fc9bf3687026daa8ec2cf32cfd962a11'/>
<id>urn:sha1:eb4d3691fc9bf3687026daa8ec2cf32cfd962a11</id>
<content type='text'>
Add tracepoints when lock operations are sent to the
server with details including lock offset, length, and flags.

smb3_lock_enter: before sending lock request
smb3_lock_done: lock acquired successfully
smb3_lock_err: lock request failed
smb3_lock_cached: lock granted from local cache (no server roundtrip)

Signed-off-by: Bharath SM &lt;bharathsm@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: open files should not hold ref on superblock</title>
<updated>2026-03-04T16:11:39+00:00</updated>
<author>
<name>Shyam Prasad N</name>
<email>sprasad@microsoft.com</email>
</author>
<published>2026-03-04T12:45:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=340cea84f691c5206561bb2e0147158fe02070be'/>
<id>urn:sha1:340cea84f691c5206561bb2e0147158fe02070be</id>
<content type='text'>
Today whenever we deal with a file, in addition to holding
a reference on the dentry, we also get a reference on the
superblock. This happens in two cases:
1. when a new cinode is allocated
2. when an oplock break is being processed

The reasoning for holding the superblock ref was to make sure
that when umount happens, if there are users of inodes and
dentries, it does not try to clean them up and wait for the
last ref to superblock to be dropped by last of such users.

But the side effect of doing that is that umount silently drops
a ref on the superblock and we could have deferred closes and
lease breaks still holding these refs.

Ideally, we should ensure that all of these users of inodes and
dentries are cleaned up at the time of umount, which is what this
code is doing.

This code change allows these code paths to use a ref on the
dentry (and hence the inode). That way, umount is
ensured to clean up SMB client resources when it's the last
ref on the superblock (For ex: when same objects are shared).

The code change also moves the call to close all the files in
deferred close list to the umount code path. It also waits for
oplock_break workers to be flushed before calling
kill_anon_super (which eventually frees up those objects).

Fixes: 24261fc23db9 ("cifs: delay super block destruction until all cifsFileInfo objects are gone")
Fixes: 705c79101ccf ("smb: client: fix use-after-free in cifs_oplock_break")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Shyam Prasad N &lt;sprasad@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: remove unnecessary tracing after put tcon</title>
<updated>2026-02-15T01:31:32+00:00</updated>
<author>
<name>Shyam Prasad N</name>
<email>sprasad@microsoft.com</email>
</author>
<published>2026-02-14T07:35:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a5a50f1415692a0fe3bf0ec17f422cac8e158e65'/>
<id>urn:sha1:a5a50f1415692a0fe3bf0ec17f422cac8e158e65</id>
<content type='text'>
This code was recently changed from manually decrementing
tcon ref to using cifs_put_tcon. But even before that change
this tracing happened after decrementing the ref count, which
is wrong. With cifs_put_tcon, tracing already happens inside it.
So just removing the extra tracing here.

Signed-off-by: Shyam Prasad N &lt;sprasad@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: Fix locking usage for tcon fields</title>
<updated>2026-02-08T23:07:43+00:00</updated>
<author>
<name>Shyam Prasad N</name>
<email>sprasad@microsoft.com</email>
</author>
<published>2026-01-31T18:51:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96c4af418586ee9a6aab61738644366426e05316'/>
<id>urn:sha1:96c4af418586ee9a6aab61738644366426e05316</id>
<content type='text'>
We used to use the cifs_tcp_ses_lock to protect a lot of objects
that are not just the server, ses or tcon lists. We later introduced
srv_lock, ses_lock and tc_lock to protect fields within the
corresponding structs. This was done to provide a more granular
protection and avoid unnecessary serialization.

There were still a couple of uses of cifs_tcp_ses_lock to provide
tcon fields. In this patch, I've replaced them with tc_lock.

Cc: stable@vger.kernel.org
Signed-off-by: Shyam Prasad N &lt;sprasad@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb3 client: add missing tracepoint for unsupported ioctls</title>
<updated>2025-12-30T15:16:45+00:00</updated>
<author>
<name>Steve French</name>
<email>stfrench@microsoft.com</email>
</author>
<published>2025-12-29T16:23:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc311611625a8aaa26813809a2c820fcd286ba2b'/>
<id>urn:sha1:bc311611625a8aaa26813809a2c820fcd286ba2b</id>
<content type='text'>
In debugging a recent problem with an xfstest, noticed that we weren't
tracing cases where the ioctl was not supported.  Add dynamic tracepoint:
    "trace-cmd record -e smb3_unsupported_ioctl"
and then after running an app which calls unsupported ioctl,
"trace-cmd show"would display e.g.
      xfs_io-7289    [012] .....  1205.137765: smb3_unsupported_ioctl: xid=19 fid=0x4535bb84 ioctl cmd=0x801c581f

Acked-by: Bharath SM &lt;bharathsm@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: Add tracepoint for krb5 auth</title>
<updated>2025-12-05T23:40:42+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.org</email>
</author>
<published>2025-12-04T21:39:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7ad785927d9eb348adb381d168ed73d0dd3c7670'/>
<id>urn:sha1:7ad785927d9eb348adb381d168ed73d0dd3c7670</id>
<content type='text'>
Add tracepoint to help debugging krb5 auth failures.

Example:

$ trace-cmd record -e smb3_kerberos_auth
$ mount.cifs ...
$ trace-cmd report
mount.cifs-1667 [003] .....  5810.668549: smb3_kerberos_auth: vers=2
host=w22-dc1.zelda.test ip=192.168.124.30:445 sec=krb5 uid=0 cruid=0
user=root pid=1667 upcall_target=app err=-126

Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.org&gt;
Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: Pierguido Lambri &lt;plambri@redhat.com&gt;
Cc: linux-cifs@vger.kernel.org
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: Add a tracepoint to log EIO errors</title>
<updated>2025-12-05T23:11:43+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2025-10-24T08:25:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f80ac7eda1cf5205aaa2b676827ae1e312a5a894'/>
<id>urn:sha1:f80ac7eda1cf5205aaa2b676827ae1e312a5a894</id>
<content type='text'>
Add a tracepoint to log EIO errors and give it the capacity to convey up to
two integers of information.  This is then wrapped with three functions:

 int smb_EIO(enum smb_eio_trace trace)
 int smb_EIO1(enum smb_eio_trace trace, unsigned long info)
 int smb_EIO2(enum smb_eio_trace trace, unsigned long info,
	      unsigned long info2)

depending on how many bits of info are desired to be logged with any
particular trace.  The functions all return -EIO and can be used in place
of -EIO.

The trace argument is an enum value that gets translated to a string when
the trace is printed.

This makes is easier to log EIO instances when the client is under high
load than turning on a printk wrapper such as cifs_dbg().  Granted, EIO
could have its own separate EIO printing since EIO shouldn't happen.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.org&gt;
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
</feed>
