CIFS: decrease log level of smb2 DFS error
Subsystems (2)
PATCH 1/1 CIFS: decrease log level of smb2 DFS error
--- fs/cifs/smb2ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/smb2ops.c +1 -1
@@ -1387,7 +1387,7 @@ smb2_get_dfs_refer(const unsigned int xid, struct cifs_ses *ses, }while (rc == -EAGAIN );if (rc) { -cifs_dbg (VFS ,"ioctl error in smb2_get_dfs_refer rc=%d\n" , rc); +cifs_dbg (FYI ,"ioctl error in smb2_get_dfs_refer rc=%d\n" , rc); goto out; }
Signature · 1 line
2.12.3
A message that is not in the archive (sent off-list or not yet received): 20171121111429.14496-1-aaptel-IBi9RG/[email protected]
Since in 99.999999% times happens just because "it is a real share", we could optionally change it instead to be wrapped in :
if (rc != <whatever STATUS_NOT_FOUND maps to>)
cifs_dbg(VFS, log the error message
so that we do not log anything if it is just a normal share but that we do log something if there is a real error.
Quoted 25 lines · Aurelien Aptel
Signed-off-by Aurelien Aptel <aaptel-IBi9RG/[email protected]>--- fs/cifs/smb2ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/cifs/smb2ops.c +1
-2@@ -1387,7 +1387,7 @@ smb2_get_dfs_refer(const unsigned int xid, struct cifs_ses *ses, }while (rc == -EAGAIN );if (rc) { -cifs_dbg (VFS ,"ioctl error in smb2_get_dfs_refer rc=%d\n" , rc); +cifs_dbg (FYI ,"ioctl error in smb2_get_dfs_refer rc=%d\n" , rc); goto out; } --2.12.3
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CAN05THRymsFpZcbXsSQj6=OVd94ZWE1L5a1EQF5-bz8qbG=oFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
PATCH v2 1/1 CIFS: don't log STATUS_NOT_FOUND errors for DFS
cifs.ko makes DFS queries regardless of the type of the server and non-DFS servers are common. This often results in superfluous logging of non-critical errors.
---
v2: instead of always logging at FYI level, only log non-ENOENT errors
at VFS level
fs/cifs/smb2ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/cifs/smb2ops.c +2 -1
@@ -1387,7 +1387,8 @@ smb2_get_dfs_refer(const unsigned int xid, struct cifs_ses *ses, }while (rc == -EAGAIN );if (rc) { -cifs_dbg (VFS ,"ioctl error in smb2_get_dfs_refer rc=%d\n" , rc); +if (rc != -ENOENT ) +cifs_dbg (VFS ,"ioctl error in smb2_get_dfs_refer rc=%d\n" , rc); goto out; }
Signature · 1 line
2.12.3
A message that is not in the archive (sent off-list or not yet received): 20171121134756.25201-1-aaptel-IBi9RG/[email protected]
Pavel Shilovskiy
Reviewed-byRE: [PATCH v2] CIFS: don't log STATUS_NOT_FOUND errors for DFS
2017-11-21 5:47 GMT-08:00 Aurelien Aptel <aaptel-IBi9RG/[email protected]>:
Quoted 29 lines
cifs.ko makes DFS queries regardless of the type of the server and non-DFS servers are common. This often results in superfluous logging of non-critical errors.
Signed-off-by Aurelien Aptel <aaptel-IBi9RG/[email protected]>---
v2: instead of always logging at FYI level, only log non-ENOENT errors
at VFS levelfs/cifs/smb2ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/cifs/smb2ops.c +2
-2@@ -1387,7 +1387,8 @@ smb2_get_dfs_refer(const unsigned int xid, struct cifs_ses *ses, }while (rc == -EAGAIN );if (rc) { -cifs_dbg (VFS ,"ioctl error in smb2_get_dfs_refer rc=%d\n" , rc); +if (rc != -ENOENT ) +cifs_dbg (VFS ,"ioctl error in smb2_get_dfs_refer rc=%d\n" , rc); goto out; } --2.12.3
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks!
--
Best regards,
Pavel Shilovsky
Quoted 8 lines · ronnie sahlberg
Since in 99.999999% times happens just because "it is a real share", we could optionally change it instead to be wrapped in :
if (rc != <whatever
STATUS_NOT_FOUNDmaps to>)
cifs_dbg(VFS, log the error messageso that we do not log anything if it is just a normal share but that we do log something if there is a real error.
Good idea
Signature · 4 lines
Aurélien Aptel / SUSE Labs Samba Team GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)