Skip to content

Commit ace2045

Browse files
committed
Merge tag '5.19-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Pull cifs client fixes from Steve French: "Two cifs debugging improvements - one found to deal with debugging a multichannel problem and one for a recent fallocate issue This does include the two larger multichannel reconnect (dynamically adjusting interfaces on reconnect) patches, because we recently found an additional problem with multichannel to one server type that I want to include at the same time" * tag '5.19-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: when a channel is not found for server, log its connection id smb3: add trace point for SMB2_set_eof
2 parents 4b35035 + 5d24968 commit ace2045

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

fs/cifs/sess.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ cifs_ses_get_chan_index(struct cifs_ses *ses,
8181
}
8282

8383
/* If we didn't find the channel, it is likely a bug */
84+
if (server)
85+
cifs_dbg(VFS, "unable to get chan index for server: 0x%llx",
86+
server->conn_id);
8487
WARN_ON(1);
8588
return 0;
8689
}

fs/cifs/smb2pdu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5154,6 +5154,8 @@ SMB2_set_eof(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,
51545154
data = &info;
51555155
size = sizeof(struct smb2_file_eof_info);
51565156

5157+
trace_smb3_set_eof(xid, persistent_fid, tcon->tid, tcon->ses->Suid, le64_to_cpu(*eof));
5158+
51575159
return send_set_info(xid, tcon, persistent_fid, volatile_fid,
51585160
pid, FILE_END_OF_FILE_INFORMATION, SMB2_O_INFO_FILE,
51595161
0, 1, &data, &size);

fs/cifs/trace.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,44 @@ DEFINE_SMB3_RW_DONE_EVENT(query_dir_done);
121121
DEFINE_SMB3_RW_DONE_EVENT(zero_done);
122122
DEFINE_SMB3_RW_DONE_EVENT(falloc_done);
123123

124+
/* For logging successful set EOF (truncate) */
125+
DECLARE_EVENT_CLASS(smb3_eof_class,
126+
TP_PROTO(unsigned int xid,
127+
__u64 fid,
128+
__u32 tid,
129+
__u64 sesid,
130+
__u64 offset),
131+
TP_ARGS(xid, fid, tid, sesid, offset),
132+
TP_STRUCT__entry(
133+
__field(unsigned int, xid)
134+
__field(__u64, fid)
135+
__field(__u32, tid)
136+
__field(__u64, sesid)
137+
__field(__u64, offset)
138+
),
139+
TP_fast_assign(
140+
__entry->xid = xid;
141+
__entry->fid = fid;
142+
__entry->tid = tid;
143+
__entry->sesid = sesid;
144+
__entry->offset = offset;
145+
),
146+
TP_printk("xid=%u sid=0x%llx tid=0x%x fid=0x%llx offset=0x%llx",
147+
__entry->xid, __entry->sesid, __entry->tid, __entry->fid,
148+
__entry->offset)
149+
)
150+
151+
#define DEFINE_SMB3_EOF_EVENT(name) \
152+
DEFINE_EVENT(smb3_eof_class, smb3_##name, \
153+
TP_PROTO(unsigned int xid, \
154+
__u64 fid, \
155+
__u32 tid, \
156+
__u64 sesid, \
157+
__u64 offset), \
158+
TP_ARGS(xid, fid, tid, sesid, offset))
159+
160+
DEFINE_SMB3_EOF_EVENT(set_eof);
161+
124162
/*
125163
* For handle based calls other than read and write, and get/set info
126164
*/

0 commit comments

Comments
 (0)