cifs: Silently ignore unknown oplock break handle
Subsystems (2)
PATCH v2 1/1 cifs: Silently ignore unknown oplock break handle
Make SMB2 not print out an error when an oplock break is received for an unknown handle, similar to SMB1. The SMB2 lease break path is not affected by this patch.
Without this, a program which writes to a file from one thread, and opens, reads, and writes the same file from another thread triggers the below errors several times a minute when run against a Samba server configured with "smb2 leases = no".
CIFS: VFS: \\192.168.0.1 No task to wake, unknown frame received! NumMids 2
00000000: 424d53fe 00000040 00000000 00000012 .SMB@........... 00000010: 00000001 00000000 ffffffff ffffffff ................ 00000020: 00000000 00000000 00000000 00000000 ................ 00000030: 00000000 00000000 00000000 00000000 ................
---
Notes:
v2:
- Drop change to lease break
- Rewrite commit message
fs/cifs/smb2misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/smb2misc.c +1 -1
@@ -755,7 +755,7 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server) }spin_unlock (&cifs_tcp_ses_lock);cifs_dbg (FYI ,"Can not process oplock break for non-existent connection\n" ); -return false; +return true; }void
Signature · 1 line
2.28.0
Tom Talpey
reviewerQuoted 32 lines · Vincent Whitchurch via samba-technical
Make SMB2 not print out an error when an oplock break is received for an unknown handle, similar to SMB1. The SMB2 lease break path is not affected by this patch.
Without this, a program which writes to a file from one thread, and opens, reads, and writes the same file from another thread triggers the below errors several times a minute when run against a Samba server configured with "smb2 leases = no".
CIFS: VFS: \\192.168.0.1 No task to wake, unknown frame received! NumMids 2
00000000: 424d53fe 00000040 00000000 00000012 .SMB@........... 00000010: 00000001 00000000 ffffffff ffffffff ................ 00000020: 00000000 00000000 00000000 00000000 ................ 00000030: 00000000 00000000 00000000 00000000 ................Signed-off-by Vincent Whitchurch <[email protected]>---
Notes:
v2:
- Drop change to lease break
- Rewrite commit messagefs/cifs/smb2misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/cifs/smb2misc.c +0
-0
fs/cifs/smb2misc.c smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server) · line 761
Quoted 8 lines
fs/cifs/smb2misc.c +1
-1@@ -755,7 +755,7 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server) }spin_unlock (&cifs_tcp_ses_lock);cifs_dbg (FYI ,"Can not process oplock break for non-existent connection\n" ); -return false; +return true; }void
As an oplock-only approach, it looks good. But the old cifs_dbg message "non-existent connection" is possibly misleading, since the connection may be perfectly fine.
When breaking the loop successfully, the code emits
cifs_dbg(FYI, "file id match, oplock break\n"); so perhaps cifs_dbg(FYI, "No file id matched, oplock break ignored\n");
?
Tom.
This issue will not be seen once changes related to deferred close for files is committed.
Currently, changes are in review. I will address review comments by this week.
Regards,
Rohith
Quoted 54 lines · Tom Talpey
Quoted 32 lines · Vincent Whitchurch via samba-technical
Make SMB2 not print out an error when an oplock break is received for an unknown handle, similar to SMB1. The SMB2 lease break path is not affected by this patch.
Without this, a program which writes to a file from one thread, and opens, reads, and writes the same file from another thread triggers the below errors several times a minute when run against a Samba server configured with "smb2 leases = no".
CIFS: VFS: \\192.168.0.1 No task to wake, unknown frame received! NumMids 2
00000000: 424d53fe 00000040 00000000 00000012 .SMB@........... 00000010: 00000001 00000000 ffffffff ffffffff ................ 00000020: 00000000 00000000 00000000 00000000 ................ 00000030: 00000000 00000000 00000000 00000000 ................Signed-off-by Vincent Whitchurch <[email protected]>---
Notes:
v2:
- Drop change to lease break
- Rewrite commit messagefs/cifs/smb2misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/cifs/smb2misc.c +0
-0fs/cifs/smb2misc.c smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server) · line 761
Quoted 8 lines
fs/cifs/smb2misc.c +1
-1@@ -755,7 +755,7 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server) }spin_unlock (&cifs_tcp_ses_lock);cifs_dbg (FYI ,"Can not process oplock break for non-existent connection\n" ); -return false; +return true; }void As an oplock-only approach, it looks good. But the old
cifs_dbgmessage "non-existent connection" is possibly misleading, since the connection may be perfectly fine.When breaking the loop successfully, the code emits
cifs_dbg(FYI, "file id match, oplock break\n"); so perhaps cifs_dbg(FYI, "No file id matched, oplock break ignored\n");?
Tom.
Tom Talpey
reviewerQuoted 2 lines · Rohith Surabattula
This issue will not be seen once changes related to deferred close for files is committed.
That may be, but it's irrelevant to this.
Quoted 1 line
Currently, changes are in review. I will address review comments by this week.
What do you mean by "in review"? Both threads are active on the mailing list. If you or others have something to discuss, please post it and don't leave us out of the discussion.
Tom.
Quoted 59 lines
Regards,
RohithQuoted 54 lines · Tom Talpey
Quoted 32 lines · Vincent Whitchurch via samba-technical
Make SMB2 not print out an error when an oplock break is received for an unknown handle, similar to SMB1. The SMB2 lease break path is not affected by this patch.
Without this, a program which writes to a file from one thread, and opens, reads, and writes the same file from another thread triggers the below errors several times a minute when run against a Samba server configured with "smb2 leases = no".
CIFS: VFS: \\192.168.0.1 No task to wake, unknown frame received! NumMids 2 00000000: 424d53fe 00000040 00000000 00000012 .SMB@........... 00000010: 00000001 00000000 ffffffff ffffffff ................ 00000020: 00000000 00000000 00000000 00000000 ................ 00000030: 00000000 00000000 00000000 00000000 ................Signed-off-by Vincent Whitchurch <[email protected]>---
Notes:
v2:
- Drop change to lease break
- Rewrite commit messagefs/cifs/smb2misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/cifs/smb2misc.c +0
-0fs/cifs/smb2misc.c smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server) · line 761
Quoted 8 lines
fs/cifs/smb2misc.c +1
-1@@ -755,7 +755,7 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server) }spin_unlock (&cifs_tcp_ses_lock);cifs_dbg (FYI ,"Can not process oplock break for non-existent connection\n" ); -return false; +return true; }void As an oplock-only approach, it looks good. But the old
cifs_dbgmessage "non-existent connection" is possibly misleading, since the connection may be perfectly fine.When breaking the loop successfully, the code emits
cifs_dbg(FYI, "file id match, oplock break\n"); so perhaps cifs_dbg(FYI, "No file id matched, oplock break ignored\n");?
Tom.
Quoted 4 lines · Rohith Surabattula
Quoted 2 lines
This issue will not be seen once changes related to deferred close for files is committed.
That may be, but it's irrelevant to this.
Got it.
Quoted 5 lines
Quoted 1 line
Currently, changes are in review. I will address review comments by this week.
What do you mean by "in review"? Both threads are active on the mailing list. If you or others have something to discuss, please post it and don't leave us out of the discussion.
I mean, there is an active thread for patch "deferred close for files". As I was busy with other activities, I didn't update the thread. Will update the thread once i get to it.
Regards,
Rohith
Quoted 75 lines · Tom Talpey
Quoted 2 lines · Rohith Surabattula
This issue will not be seen once changes related to deferred close for files is committed.
That may be, but it's irrelevant to this.
Quoted 1 line
Currently, changes are in review. I will address review comments by this week.
What do you mean by "in review"? Both threads are active on the mailing list. If you or others have something to discuss, please post it and don't leave us out of the discussion.
Tom.
Quoted 59 lines
Regards,
RohithQuoted 54 lines · Tom Talpey
Quoted 32 lines · Vincent Whitchurch via samba-technical
Make SMB2 not print out an error when an oplock break is received for an unknown handle, similar to SMB1. The SMB2 lease break path is not affected by this patch.
Without this, a program which writes to a file from one thread, and opens, reads, and writes the same file from another thread triggers the below errors several times a minute when run against a Samba server configured with "smb2 leases = no".
CIFS: VFS: \\192.168.0.1 No task to wake, unknown frame received! NumMids 2 00000000: 424d53fe 00000040 00000000 00000012 .SMB@........... 00000010: 00000001 00000000 ffffffff ffffffff ................ 00000020: 00000000 00000000 00000000 00000000 ................ 00000030: 00000000 00000000 00000000 00000000 ................Signed-off-by Vincent Whitchurch <[email protected]>---
Notes:
v2:
- Drop change to lease break
- Rewrite commit messagefs/cifs/smb2misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/cifs/smb2misc.c +0
-0fs/cifs/smb2misc.c smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server) · line 761
Quoted 8 lines
fs/cifs/smb2misc.c +1
-1@@ -755,7 +755,7 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server) }spin_unlock (&cifs_tcp_ses_lock);cifs_dbg (FYI ,"Can not process oplock break for non-existent connection\n" ); -return false; +return true; }void As an oplock-only approach, it looks good. But the old
cifs_dbgmessage "non-existent connection" is possibly misleading, since the connection may be perfectly fine.When breaking the loop successfully, the code emits
cifs_dbg(FYI, "file id match, oplock break\n"); so perhaps cifs_dbg(FYI, "No file id matched, oplock break ignored\n");?
Tom.