Skip to contentSkip to conversation

CIFS: decrease log level of smb2 DFS error

PATCH In review Aurelien Aptel 3 participants 5 messages Nov 21, 2017 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index 0dafdbae1f8c..59d18a7d550d 100644
@@ -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]

#2 lore raw

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
---
 fs/cifs/smb2ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/smb2ops.c +1 -2
index 0dafdbae1f8c..59d18a7d550d 100644
@@ -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

#4 lore raw

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
index 0dafdbae1f8c..3aa9f46c51e3 100644
@@ -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]

Reviewed-by
#6 lore raw

RE: [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.

---
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 -2
index 0dafdbae1f8c..3aa9f46c51e3 100644
@@ -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

#7 lore raw
In reply to a message not in the archive
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_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.

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)