Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cifs: Standardize logging output

Use pr_fmt to standardize all logging for fs/cifs.

Some logging output had no CIFS: specific prefix.

Now all output has one of three prefixes:

o CIFS:
o CIFS: VFS:
o Root-CIFS:

Miscellanea:

o Convert printks to pr_<level>
o Neaten macro definitions
o Remove embedded CIFS: prefixes from formats
o Convert "illegal" to "invalid"
o Coalesce formats
o Add missing '\n' format terminations
o Consolidate multiple cifs_dbg continuations into single calls
o More consistent use of upper case first word output logging
o Multiline statement argument alignment and wrapping

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by

Joe Perches and committed by
Steve French
a0a3036b 82e9367c

+319 -381
+69 -76
fs/cifs/cifs_debug.h
··· 8 8 #ifndef _H_CIFS_DEBUG 9 9 #define _H_CIFS_DEBUG 10 10 11 + #ifdef pr_fmt 12 + #undef pr_fmt 13 + #endif 14 + 15 + #define pr_fmt(fmt) "CIFS: " fmt 16 + 11 17 void cifs_dump_mem(char *label, void *data, int length); 12 18 void cifs_dump_detail(void *buf, struct TCP_Server_Info *ptcp_info); 13 19 void cifs_dump_mids(struct TCP_Server_Info *); ··· 52 46 */ 53 47 54 48 /* Information level messages, minor events */ 55 - #define cifs_info_func(ratefunc, fmt, ...) \ 56 - do { \ 57 - pr_info_ ## ratefunc("CIFS: " fmt, ##__VA_ARGS__); \ 58 - } while (0) 49 + #define cifs_info_func(ratefunc, fmt, ...) \ 50 + pr_info_ ## ratefunc(fmt, ##__VA_ARGS__) 59 51 60 - #define cifs_info(fmt, ...) \ 61 - do { \ 62 - cifs_info_func(ratelimited, fmt, ##__VA_ARGS__); \ 63 - } while (0) 52 + #define cifs_info(fmt, ...) \ 53 + cifs_info_func(ratelimited, fmt, ##__VA_ARGS__) 64 54 65 55 /* information message: e.g., configuration, major event */ 66 - #define cifs_dbg_func(ratefunc, type, fmt, ...) \ 67 - do { \ 68 - if ((type) & FYI && cifsFYI & CIFS_INFO) { \ 69 - pr_debug_ ## ratefunc("%s: " \ 70 - fmt, __FILE__, ##__VA_ARGS__); \ 71 - } else if ((type) & VFS) { \ 72 - pr_err_ ## ratefunc("CIFS VFS: " \ 73 - fmt, ##__VA_ARGS__); \ 74 - } else if ((type) & NOISY && (NOISY != 0)) { \ 75 - pr_debug_ ## ratefunc(fmt, ##__VA_ARGS__); \ 76 - } \ 56 + #define cifs_dbg_func(ratefunc, type, fmt, ...) \ 57 + do { \ 58 + if ((type) & FYI && cifsFYI & CIFS_INFO) { \ 59 + pr_debug_ ## ratefunc("%s: " fmt, \ 60 + __FILE__, ##__VA_ARGS__); \ 61 + } else if ((type) & VFS) { \ 62 + pr_err_ ## ratefunc("VFS: " fmt, ##__VA_ARGS__); \ 63 + } else if ((type) & NOISY && (NOISY != 0)) { \ 64 + pr_debug_ ## ratefunc(fmt, ##__VA_ARGS__); \ 65 + } \ 77 66 } while (0) 78 67 79 - #define cifs_dbg(type, fmt, ...) \ 80 - do { \ 81 - if ((type) & ONCE) \ 82 - cifs_dbg_func(once, \ 83 - type, fmt, ##__VA_ARGS__); \ 84 - else \ 85 - cifs_dbg_func(ratelimited, \ 86 - type, fmt, ##__VA_ARGS__); \ 68 + #define cifs_dbg(type, fmt, ...) \ 69 + do { \ 70 + if ((type) & ONCE) \ 71 + cifs_dbg_func(once, type, fmt, ##__VA_ARGS__); \ 72 + else \ 73 + cifs_dbg_func(ratelimited, type, fmt, ##__VA_ARGS__); \ 87 74 } while (0) 88 75 89 - #define cifs_server_dbg_func(ratefunc, type, fmt, ...) \ 90 - do { \ 91 - const char *sn = ""; \ 92 - if (server && server->hostname) \ 93 - sn = server->hostname; \ 94 - if ((type) & FYI && cifsFYI & CIFS_INFO) { \ 95 - pr_debug_ ## ratefunc("%s: \\\\%s " fmt, \ 96 - __FILE__, sn, ##__VA_ARGS__); \ 97 - } else if ((type) & VFS) { \ 98 - pr_err_ ## ratefunc("CIFS VFS: \\\\%s " fmt, \ 99 - sn, ##__VA_ARGS__); \ 100 - } else if ((type) & NOISY && (NOISY != 0)) { \ 101 - pr_debug_ ## ratefunc("\\\\%s " fmt, \ 102 - sn, ##__VA_ARGS__); \ 103 - } \ 76 + #define cifs_server_dbg_func(ratefunc, type, fmt, ...) \ 77 + do { \ 78 + const char *sn = ""; \ 79 + if (server && server->hostname) \ 80 + sn = server->hostname; \ 81 + if ((type) & FYI && cifsFYI & CIFS_INFO) { \ 82 + pr_debug_ ## ratefunc("%s: \\\\%s " fmt, \ 83 + __FILE__, sn, ##__VA_ARGS__); \ 84 + } else if ((type) & VFS) { \ 85 + pr_err_ ## ratefunc("VFS: \\\\%s " fmt, \ 86 + sn, ##__VA_ARGS__); \ 87 + } else if ((type) & NOISY && (NOISY != 0)) { \ 88 + pr_debug_ ## ratefunc("\\\\%s " fmt, \ 89 + sn, ##__VA_ARGS__); \ 90 + } \ 104 91 } while (0) 105 92 106 - #define cifs_server_dbg(type, fmt, ...) \ 107 - do { \ 108 - if ((type) & ONCE) \ 109 - cifs_server_dbg_func(once, \ 110 - type, fmt, ##__VA_ARGS__); \ 111 - else \ 112 - cifs_server_dbg_func(ratelimited, \ 113 - type, fmt, ##__VA_ARGS__); \ 93 + #define cifs_server_dbg(type, fmt, ...) \ 94 + do { \ 95 + if ((type) & ONCE) \ 96 + cifs_server_dbg_func(once, type, fmt, ##__VA_ARGS__); \ 97 + else \ 98 + cifs_server_dbg_func(ratelimited, type, fmt, \ 99 + ##__VA_ARGS__); \ 114 100 } while (0) 115 101 116 - #define cifs_tcon_dbg_func(ratefunc, type, fmt, ...) \ 117 - do { \ 118 - const char *tn = ""; \ 119 - if (tcon && tcon->treeName) \ 120 - tn = tcon->treeName; \ 121 - if ((type) & FYI && cifsFYI & CIFS_INFO) { \ 122 - pr_debug_ ## ratefunc("%s: %s " fmt, \ 123 - __FILE__, tn, ##__VA_ARGS__); \ 124 - } else if ((type) & VFS) { \ 125 - pr_err_ ## ratefunc("CIFS VFS: %s " fmt, \ 126 - tn, ##__VA_ARGS__); \ 127 - } else if ((type) & NOISY && (NOISY != 0)) { \ 128 - pr_debug_ ## ratefunc("%s " fmt, \ 129 - tn, ##__VA_ARGS__); \ 130 - } \ 102 + #define cifs_tcon_dbg_func(ratefunc, type, fmt, ...) \ 103 + do { \ 104 + const char *tn = ""; \ 105 + if (tcon && tcon->treeName) \ 106 + tn = tcon->treeName; \ 107 + if ((type) & FYI && cifsFYI & CIFS_INFO) { \ 108 + pr_debug_ ## ratefunc("%s: %s " fmt, \ 109 + __FILE__, tn, ##__VA_ARGS__); \ 110 + } else if ((type) & VFS) { \ 111 + pr_err_ ## ratefunc("VFS: %s " fmt, tn, ##__VA_ARGS__); \ 112 + } else if ((type) & NOISY && (NOISY != 0)) { \ 113 + pr_debug_ ## ratefunc("%s " fmt, tn, ##__VA_ARGS__); \ 114 + } \ 131 115 } while (0) 132 116 133 - #define cifs_tcon_dbg(type, fmt, ...) \ 134 - do { \ 135 - if ((type) & ONCE) \ 136 - cifs_tcon_dbg_func(once, \ 137 - type, fmt, ##__VA_ARGS__); \ 138 - else \ 139 - cifs_tcon_dbg_func(ratelimited, \ 140 - type, fmt, ##__VA_ARGS__); \ 117 + #define cifs_tcon_dbg(type, fmt, ...) \ 118 + do { \ 119 + if ((type) & ONCE) \ 120 + cifs_tcon_dbg_func(once, type, fmt, ##__VA_ARGS__); \ 121 + else \ 122 + cifs_tcon_dbg_func(ratelimited, type, fmt, \ 123 + ##__VA_ARGS__); \ 141 124 } while (0) 142 125 143 126 /* ··· 154 159 } while (0) 155 160 156 161 #define cifs_info(fmt, ...) \ 157 - do { \ 158 - pr_info("CIFS: "fmt, ##__VA_ARGS__); \ 159 - } while (0) 162 + pr_info(fmt, ##__VA_ARGS__) 160 163 #endif 161 164 162 165 #endif /* _H_CIFS_DEBUG */
+4 -4
fs/cifs/cifsencrypt.c
··· 520 520 521 521 rc = crypto_shash_init(&ses->server->secmech.sdeschmacmd5->shash); 522 522 if (rc) { 523 - cifs_dbg(VFS, "%s: could not init hmacmd5\n", __func__); 523 + cifs_dbg(VFS, "%s: Could not init hmacmd5\n", __func__); 524 524 return rc; 525 525 } 526 526 ··· 624 624 625 625 rc = crypto_shash_init(&ses->server->secmech.sdeschmacmd5->shash); 626 626 if (rc) { 627 - cifs_dbg(VFS, "%s: could not init hmacmd5\n", __func__); 627 + cifs_dbg(VFS, "%s: Could not init hmacmd5\n", __func__); 628 628 return rc; 629 629 } 630 630 ··· 723 723 /* calculate ntlmv2_hash */ 724 724 rc = calc_ntlmv2_hash(ses, ntlmv2_hash, nls_cp); 725 725 if (rc) { 726 - cifs_dbg(VFS, "could not get v2 hash rc %d\n", rc); 726 + cifs_dbg(VFS, "Could not get v2 hash rc %d\n", rc); 727 727 goto unlock; 728 728 } 729 729 ··· 783 783 784 784 ctx_arc4 = kmalloc(sizeof(*ctx_arc4), GFP_KERNEL); 785 785 if (!ctx_arc4) { 786 - cifs_dbg(VFS, "could not allocate arc4 context\n"); 786 + cifs_dbg(VFS, "Could not allocate arc4 context\n"); 787 787 return -ENOMEM; 788 788 } 789 789
+13 -13
fs/cifs/cifsproto.h
··· 45 45 unsigned int /* length */); 46 46 extern unsigned int _get_xid(void); 47 47 extern void _free_xid(unsigned int); 48 - #define get_xid() \ 49 - ({ \ 48 + #define get_xid() \ 49 + ({ \ 50 50 unsigned int __xid = _get_xid(); \ 51 - cifs_dbg(FYI, "CIFS VFS: in %s as Xid: %u with uid: %d\n", \ 51 + cifs_dbg(FYI, "VFS: in %s as Xid: %u with uid: %d\n", \ 52 52 __func__, __xid, \ 53 53 from_kuid(&init_user_ns, current_fsuid())); \ 54 - trace_smb3_enter(__xid, __func__); \ 55 - __xid; \ 54 + trace_smb3_enter(__xid, __func__); \ 55 + __xid; \ 56 56 }) 57 57 58 - #define free_xid(curr_xid) \ 59 - do { \ 60 - _free_xid(curr_xid); \ 61 - cifs_dbg(FYI, "CIFS VFS: leaving %s (xid = %u) rc = %d\n", \ 62 - __func__, curr_xid, (int)rc); \ 63 - if (rc) \ 58 + #define free_xid(curr_xid) \ 59 + do { \ 60 + _free_xid(curr_xid); \ 61 + cifs_dbg(FYI, "VFS: leaving %s (xid = %u) rc = %d\n", \ 62 + __func__, curr_xid, (int)rc); \ 63 + if (rc) \ 64 64 trace_smb3_exit_err(curr_xid, __func__, (int)rc); \ 65 - else \ 66 - trace_smb3_exit_done(curr_xid, __func__); \ 65 + else \ 66 + trace_smb3_exit_done(curr_xid, __func__); \ 67 67 } while (0) 68 68 extern int init_cifs_idmap(void); 69 69 extern void exit_cifs_idmap(void);
+3 -3
fs/cifs/cifsroot.c
··· 56 56 /* len is strlen(unc) + '\0' */ 57 57 len = s - line + 1; 58 58 if (len > sizeof(root_dev)) { 59 - printk(KERN_ERR "Root-CIFS: UNC path too long\n"); 59 + pr_err("Root-CIFS: UNC path too long\n"); 60 60 return 1; 61 61 } 62 62 strlcpy(root_dev, line, len); ··· 66 66 sizeof(root_opts), "%s,%s", 67 67 DEFAULT_MNT_OPTS, s + 1); 68 68 if (n >= sizeof(root_opts)) { 69 - printk(KERN_ERR "Root-CIFS: mount options string too long\n"); 69 + pr_err("Root-CIFS: mount options string too long\n"); 70 70 root_opts[sizeof(root_opts)-1] = '\0'; 71 71 return 1; 72 72 } ··· 83 83 int __init cifs_root_data(char **dev, char **opts) 84 84 { 85 85 if (!root_dev[0] || root_server_addr == htonl(INADDR_NONE)) { 86 - printk(KERN_ERR "Root-CIFS: no SMB server address\n"); 86 + pr_err("Root-CIFS: no SMB server address\n"); 87 87 return -1; 88 88 } 89 89
+12 -12
fs/cifs/cifssmb.c
··· 281 281 (server->tcpStatus != CifsNeedReconnect), 282 282 10 * HZ); 283 283 if (rc < 0) { 284 - cifs_dbg(FYI, "%s: aborting reconnect due to a received" 285 - " signal by the process\n", __func__); 284 + cifs_dbg(FYI, "%s: aborting reconnect due to a received signal by the process\n", 285 + __func__); 286 286 return -ERESTARTSYS; 287 287 } 288 288 ··· 343 343 cifs_dbg(FYI, "reconnect tcon rc = %d\n", rc); 344 344 345 345 if (rc) { 346 - printk_once(KERN_WARNING "reconnect tcon failed rc = %d\n", rc); 346 + pr_warn_once("reconnect tcon failed rc = %d\n", rc); 347 347 goto out; 348 348 } 349 349 ··· 576 576 /* If server requires signing, does client allow it? */ 577 577 if (srv_sign_required) { 578 578 if (!mnt_sign_enabled) { 579 - cifs_dbg(VFS, "Server requires signing, but it's disabled in SecurityFlags!"); 579 + cifs_dbg(VFS, "Server requires signing, but it's disabled in SecurityFlags!\n"); 580 580 return -ENOTSUPP; 581 581 } 582 582 server->sign = true; ··· 585 585 /* If client requires signing, does server allow it? */ 586 586 if (mnt_sign_required) { 587 587 if (!srv_sign_enabled) { 588 - cifs_dbg(VFS, "Server does not support signing!"); 588 + cifs_dbg(VFS, "Server does not support signing!\n"); 589 589 return -ENOTSUPP; 590 590 } 591 591 server->sign = true; 592 592 } 593 593 594 594 if (cifs_rdma_enabled(server) && server->sign) 595 - cifs_dbg(VFS, "Signing is enabled, and RDMA read/write will be disabled"); 595 + cifs_dbg(VFS, "Signing is enabled, and RDMA read/write will be disabled\n"); 596 596 597 597 return 0; 598 598 } ··· 722 722 pSMB->hdr.Flags2 |= (SMBFLG2_UNICODE | SMBFLG2_ERR_STATUS); 723 723 724 724 if (should_set_ext_sec_flag(ses->sectype)) { 725 - cifs_dbg(FYI, "Requesting extended security."); 725 + cifs_dbg(FYI, "Requesting extended security\n"); 726 726 pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; 727 727 } 728 728 ··· 3887 3887 struct file_chattr_info *pfinfo; 3888 3888 /* BB Do we need a cast or hash here ? */ 3889 3889 if (count != 16) { 3890 - cifs_dbg(FYI, "Illegal size ret in GetExtAttr\n"); 3890 + cifs_dbg(FYI, "Invalid size ret in GetExtAttr\n"); 3891 3891 rc = -EIO; 3892 3892 goto GetExtAttrOut; 3893 3893 } ··· 4263 4263 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 4264 4264 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 4265 4265 if (rc) { 4266 - cifs_dbg(FYI, "Send error in QFileInfo = %d", rc); 4266 + cifs_dbg(FYI, "Send error in QFileInfo = %d\n", rc); 4267 4267 } else { /* decode response */ 4268 4268 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 4269 4269 ··· 4430 4430 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 4431 4431 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 4432 4432 if (rc) { 4433 - cifs_dbg(FYI, "Send error in UnixQFileInfo = %d", rc); 4433 + cifs_dbg(FYI, "Send error in UnixQFileInfo = %d\n", rc); 4434 4434 } else { /* decode response */ 4435 4435 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 4436 4436 ··· 4512 4512 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 4513 4513 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 4514 4514 if (rc) { 4515 - cifs_dbg(FYI, "Send error in UnixQPathInfo = %d", rc); 4515 + cifs_dbg(FYI, "Send error in UnixQPathInfo = %d\n", rc); 4516 4516 } else { /* decode response */ 4517 4517 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 4518 4518 ··· 4932 4932 struct file_internal_info *pfinfo; 4933 4933 /* BB Do we need a cast or hash here ? */ 4934 4934 if (count < 8) { 4935 - cifs_dbg(FYI, "Illegal size ret in QryIntrnlInf\n"); 4935 + cifs_dbg(FYI, "Invalid size ret in QryIntrnlInf\n"); 4936 4936 rc = -EIO; 4937 4937 goto GetInodeNumOut; 4938 4938 }
+32 -45
fs/cifs/connect.c
··· 879 879 * function has finished processing it is a bug. 880 880 */ 881 881 if (mid->mid_flags & MID_DELETED) 882 - printk_once(KERN_WARNING 883 - "trying to dequeue a deleted mid\n"); 882 + pr_warn_once("trying to dequeue a deleted mid\n"); 884 883 else { 885 884 list_del_init(&mid->qhead); 886 885 mid->mid_flags |= MID_DELETED; ··· 1228 1229 smb2_add_credits_from_hdr(bufs[i], server); 1229 1230 cifs_dbg(FYI, "Received oplock break\n"); 1230 1231 } else { 1231 - cifs_server_dbg(VFS, "No task to wake, unknown frame " 1232 - "received! NumMids %d\n", 1233 - atomic_read(&midCount)); 1232 + cifs_server_dbg(VFS, "No task to wake, unknown frame received! NumMids %d\n", 1233 + atomic_read(&midCount)); 1234 1234 cifs_dump_mem("Received Data is: ", bufs[i], 1235 1235 HEADER_SIZE(server)); 1236 1236 smb2_add_credits_from_hdr(bufs[i], server); ··· 1474 1476 cifs_dbg(VFS, "vers=1.0 (cifs) not permitted when mounting with smb3\n"); 1475 1477 return 1; 1476 1478 } 1477 - cifs_dbg(VFS, "Use of the less secure dialect vers=1.0 " 1478 - "is not recommended unless required for " 1479 - "access to very old servers\n"); 1479 + cifs_dbg(VFS, "Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers\n"); 1480 1480 vol->ops = &smb1_operations; 1481 1481 vol->vals = &smb1_values; 1482 1482 break; ··· 1541 1545 size_t len; 1542 1546 1543 1547 if (unlikely(!devname || !*devname)) { 1544 - cifs_dbg(VFS, "Device name not specified.\n"); 1548 + cifs_dbg(VFS, "Device name not specified\n"); 1545 1549 return -EINVAL; 1546 1550 } 1547 1551 ··· 1691 1695 case 0: 1692 1696 break; 1693 1697 case -ENOMEM: 1694 - cifs_dbg(VFS, "Unable to allocate memory for devname.\n"); 1698 + cifs_dbg(VFS, "Unable to allocate memory for devname\n"); 1695 1699 goto cifs_parse_mount_err; 1696 1700 case -EINVAL: 1697 - cifs_dbg(VFS, "Malformed UNC in devname.\n"); 1701 + cifs_dbg(VFS, "Malformed UNC in devname\n"); 1698 1702 goto cifs_parse_mount_err; 1699 1703 default: 1700 - cifs_dbg(VFS, "Unknown error parsing devname.\n"); 1704 + cifs_dbg(VFS, "Unknown error parsing devname\n"); 1701 1705 goto cifs_parse_mount_err; 1702 1706 } 1703 1707 ··· 1908 1912 vol->seal = 1; 1909 1913 break; 1910 1914 case Opt_noac: 1911 - pr_warn("CIFS: Mount option noac not supported. Instead set /proc/fs/cifs/LookupCacheEnabled to 0\n"); 1915 + pr_warn("Mount option noac not supported. Instead set /proc/fs/cifs/LookupCacheEnabled to 0\n"); 1912 1916 break; 1913 1917 case Opt_fsc: 1914 1918 #ifndef CONFIG_CIFS_FSCACHE ··· 2155 2159 2156 2160 if (strnlen(string, CIFS_MAX_USERNAME_LEN) > 2157 2161 CIFS_MAX_USERNAME_LEN) { 2158 - pr_warn("CIFS: username too long\n"); 2162 + pr_warn("username too long\n"); 2159 2163 goto cifs_parse_mount_err; 2160 2164 } 2161 2165 ··· 2221 2225 temp_len = strlen(value); 2222 2226 vol->password = kzalloc(temp_len+1, GFP_KERNEL); 2223 2227 if (vol->password == NULL) { 2224 - pr_warn("CIFS: no memory for password\n"); 2228 + pr_warn("no memory for password\n"); 2225 2229 goto cifs_parse_mount_err; 2226 2230 } 2227 2231 ··· 2245 2249 2246 2250 if (!cifs_convert_address(dstaddr, string, 2247 2251 strlen(string))) { 2248 - pr_err("CIFS: bad ip= option (%s).\n", string); 2252 + pr_err("bad ip= option (%s)\n", string); 2249 2253 goto cifs_parse_mount_err; 2250 2254 } 2251 2255 got_ip = true; ··· 2257 2261 2258 2262 if (strnlen(string, CIFS_MAX_DOMAINNAME_LEN) 2259 2263 == CIFS_MAX_DOMAINNAME_LEN) { 2260 - pr_warn("CIFS: domain name too long\n"); 2264 + pr_warn("domain name too long\n"); 2261 2265 goto cifs_parse_mount_err; 2262 2266 } 2263 2267 2264 2268 kfree(vol->domainname); 2265 2269 vol->domainname = kstrdup(string, GFP_KERNEL); 2266 2270 if (!vol->domainname) { 2267 - pr_warn("CIFS: no memory for domainname\n"); 2271 + pr_warn("no memory for domainname\n"); 2268 2272 goto cifs_parse_mount_err; 2269 2273 } 2270 2274 cifs_dbg(FYI, "Domain name set\n"); ··· 2277 2281 if (!cifs_convert_address( 2278 2282 (struct sockaddr *)&vol->srcaddr, 2279 2283 string, strlen(string))) { 2280 - pr_warn("CIFS: Could not parse srcaddr: %s\n", 2284 + pr_warn("Could not parse srcaddr: %s\n", 2281 2285 string); 2282 2286 goto cifs_parse_mount_err; 2283 2287 } ··· 2288 2292 goto out_nomem; 2289 2293 2290 2294 if (strnlen(string, 1024) >= 65) { 2291 - pr_warn("CIFS: iocharset name too long.\n"); 2295 + pr_warn("iocharset name too long\n"); 2292 2296 goto cifs_parse_mount_err; 2293 2297 } 2294 2298 ··· 2297 2301 vol->iocharset = kstrdup(string, 2298 2302 GFP_KERNEL); 2299 2303 if (!vol->iocharset) { 2300 - pr_warn("CIFS: no memory for charset\n"); 2304 + pr_warn("no memory for charset\n"); 2301 2305 goto cifs_parse_mount_err; 2302 2306 } 2303 2307 } ··· 2328 2332 * set at top of the function 2329 2333 */ 2330 2334 if (i == RFC1001_NAME_LEN && string[i] != 0) 2331 - pr_warn("CIFS: netbiosname longer than 15 truncated.\n"); 2335 + pr_warn("netbiosname longer than 15 truncated\n"); 2332 2336 break; 2333 2337 case Opt_servern: 2334 2338 /* servernetbiosname specified override *SMBSERVER */ ··· 2354 2358 /* The string has 16th byte zero still from 2355 2359 set at top of the function */ 2356 2360 if (i == RFC1001_NAME_LEN && string[i] != 0) 2357 - pr_warn("CIFS: server netbiosname longer than 15 truncated.\n"); 2361 + pr_warn("server netbiosname longer than 15 truncated\n"); 2358 2362 break; 2359 2363 case Opt_ver: 2360 2364 /* version of mount userspace tools, not dialect */ ··· 2365 2369 /* If interface changes in mount.cifs bump to new ver */ 2366 2370 if (strncasecmp(string, "1", 1) == 0) { 2367 2371 if (strlen(string) > 1) { 2368 - pr_warn("Bad mount helper ver=%s. Did " 2369 - "you want SMB1 (CIFS) dialect " 2370 - "and mean to type vers=1.0 " 2371 - "instead?\n", string); 2372 + pr_warn("Bad mount helper ver=%s. Did you want SMB1 (CIFS) dialect and mean to type vers=1.0 instead?\n", 2373 + string); 2372 2374 goto cifs_parse_mount_err; 2373 2375 } 2374 2376 /* This is the default */ 2375 2377 break; 2376 2378 } 2377 2379 /* For all other value, error */ 2378 - pr_warn("CIFS: Invalid mount helper version specified\n"); 2380 + pr_warn("Invalid mount helper version specified\n"); 2379 2381 goto cifs_parse_mount_err; 2380 2382 case Opt_vers: 2381 2383 /* protocol version (dialect) */ ··· 2416 2422 } 2417 2423 2418 2424 if (!sloppy && invalid) { 2419 - pr_err("CIFS: Unknown mount option \"%s\"\n", invalid); 2425 + pr_err("Unknown mount option \"%s\"\n", invalid); 2420 2426 goto cifs_parse_mount_err; 2421 2427 } 2422 2428 ··· 2452 2458 slash = strchr(&vol->UNC[2], '\\'); 2453 2459 len = slash - &vol->UNC[2]; 2454 2460 if (!cifs_convert_address(dstaddr, &vol->UNC[2], len)) { 2455 - pr_err("Unable to determine destination address.\n"); 2461 + pr_err("Unable to determine destination address\n"); 2456 2462 goto cifs_parse_mount_err; 2457 2463 } 2458 2464 } ··· 2463 2469 if (uid_specified) 2464 2470 vol->override_uid = override_uid; 2465 2471 else if (override_uid == 1) 2466 - pr_notice("CIFS: ignoring forceuid mount option specified with no uid= option.\n"); 2472 + pr_notice("ignoring forceuid mount option specified with no uid= option\n"); 2467 2473 2468 2474 if (gid_specified) 2469 2475 vol->override_gid = override_gid; 2470 2476 else if (override_gid == 1) 2471 - pr_notice("CIFS: ignoring forcegid mount option specified with no gid= option.\n"); 2477 + pr_notice("ignoring forcegid mount option specified with no gid= option\n"); 2472 2478 2473 2479 if (got_version == false) 2474 - pr_warn_once("No dialect specified on mount. Default has changed" 2475 - " to a more secure dialect, SMB2.1 or later (e.g. " 2476 - "SMB3.1.1), from CIFS (SMB1). To use the less secure " 2477 - "SMB1 dialect to access old servers which do not " 2478 - "support SMB3.1.1 (or even SMB3 or SMB2.1) specify " 2479 - "vers=1.0 on mount.\n"); 2480 + pr_warn_once("No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3.1.1), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3.1.1 (or even SMB3 or SMB2.1) specify vers=1.0 on mount.\n"); 2480 2481 2481 2482 kfree(mountdata_copy); 2482 2483 return 0; ··· 3189 3200 strlen(ses->domainName), 3190 3201 GFP_KERNEL); 3191 3202 if (!vol->domainname) { 3192 - cifs_dbg(FYI, "Unable to allocate %zd bytes for " 3193 - "domain\n", len); 3203 + cifs_dbg(FYI, "Unable to allocate %zd bytes for domain\n", 3204 + len); 3194 3205 rc = -ENOMEM; 3195 3206 kfree(vol->username); 3196 3207 vol->username = NULL; ··· 3513 3524 if (volume_info->linux_ext) { 3514 3525 if (ses->server->posix_ext_supported) { 3515 3526 tcon->posix_extensions = true; 3516 - printk_once(KERN_WARNING 3517 - "SMB3.11 POSIX Extensions are experimental\n"); 3527 + pr_warn_once("SMB3.11 POSIX Extensions are experimental\n"); 3518 3528 } else { 3519 - cifs_dbg(VFS, "Server does not support mounting with posix SMB3.11 extensions.\n"); 3529 + cifs_dbg(VFS, "Server does not support mounting with posix SMB3.11 extensions\n"); 3520 3530 rc = -EOPNOTSUPP; 3521 3531 goto out_fail; 3522 3532 } ··· 4745 4757 rc = cifs_are_all_path_components_accessible(server, xid, tcon, 4746 4758 cifs_sb, full_path, tcon->Flags & SMB_SHARE_IS_IN_DFS); 4747 4759 if (rc != 0) { 4748 - cifs_server_dbg(VFS, "cannot query dirs between root and final path, " 4749 - "enabling CIFS_MOUNT_USE_PREFIX_PATH\n"); 4760 + cifs_server_dbg(VFS, "cannot query dirs between root and final path, enabling CIFS_MOUNT_USE_PREFIX_PATH\n"); 4750 4761 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH; 4751 4762 rc = 0; 4752 4763 }
+7 -7
fs/cifs/dfs_cache.c
··· 198 198 if (c != '0') 199 199 return -EINVAL; 200 200 201 - cifs_dbg(FYI, "clearing dfs cache"); 201 + cifs_dbg(FYI, "clearing dfs cache\n"); 202 202 203 203 down_write(&htable_rw_lock); 204 204 flush_cache_ents(); ··· 234 234 235 235 static inline void dump_ce(const struct cache_entry *ce) 236 236 { 237 - cifs_dbg(FYI, "cache entry: path=%s,type=%s,ttl=%d,etime=%ld," 238 - "interlink=%s,path_consumed=%d,expired=%s\n", ce->path, 237 + cifs_dbg(FYI, "cache entry: path=%s,type=%s,ttl=%d,etime=%ld,interlink=%s,path_consumed=%d,expired=%s\n", 238 + ce->path, 239 239 ce->srvtype == DFS_TYPE_ROOT ? "root" : "link", ce->ttl, 240 240 ce->etime.tv_nsec, 241 241 IS_INTERLINK_SET(ce->flags) ? "yes" : "no", ··· 453 453 } 454 454 455 455 if (!to_del) { 456 - cifs_dbg(FYI, "%s: no entry to remove", __func__); 456 + cifs_dbg(FYI, "%s: no entry to remove\n", __func__); 457 457 return; 458 458 } 459 459 460 - cifs_dbg(FYI, "%s: removing entry", __func__); 460 + cifs_dbg(FYI, "%s: removing entry\n", __func__); 461 461 dump_ce(to_del); 462 462 flush_cache_ent(to_del); 463 463 } ··· 696 696 } 697 697 698 698 if (atomic_read(&cache_count) >= CACHE_MAX_ENTRIES) { 699 - cifs_dbg(FYI, "%s: reached max cache size (%d)", __func__, 700 - CACHE_MAX_ENTRIES); 699 + cifs_dbg(FYI, "%s: reached max cache size (%d)\n", 700 + __func__, CACHE_MAX_ENTRIES); 701 701 down_write(&htable_rw_lock); 702 702 remove_oldest_entry(); 703 703 up_write(&htable_rw_lock);
+10 -14
fs/cifs/file.c
··· 857 857 858 858 tcon->need_reopen_files = false; 859 859 860 - cifs_dbg(FYI, "Reopen persistent handles"); 860 + cifs_dbg(FYI, "Reopen persistent handles\n"); 861 861 INIT_LIST_HEAD(&tmp_list); 862 862 863 863 /* list all files open on tree connection, reopen resilient handles */ ··· 2056 2056 2057 2057 rc = cifs_get_writable_file(cifs_inode, flags, &cfile); 2058 2058 if (rc) 2059 - cifs_dbg(FYI, "couldn't find writable handle rc=%d", rc); 2059 + cifs_dbg(FYI, "Couldn't find writable handle rc=%d\n", rc); 2060 2060 2061 2061 return cfile; 2062 2062 } ··· 2923 2923 from, &pagevec, cur_len, &start); 2924 2924 if (result < 0) { 2925 2925 cifs_dbg(VFS, 2926 - "direct_writev couldn't get user pages " 2927 - "(rc=%zd) iter type %d iov_offset %zd " 2928 - "count %zd\n", 2929 - result, iov_iter_type(from), 2930 - from->iov_offset, from->count); 2926 + "direct_writev couldn't get user pages (rc=%zd) iter type %d iov_offset %zd count %zd\n", 2927 + result, iov_iter_type(from), 2928 + from->iov_offset, from->count); 2931 2929 dump_stack(); 2932 2930 2933 2931 rc = result; ··· 3652 3654 cur_len, &start); 3653 3655 if (result < 0) { 3654 3656 cifs_dbg(VFS, 3655 - "couldn't get user pages (rc=%zd)" 3656 - " iter type %d" 3657 - " iov_offset %zd count %zd\n", 3658 - result, iov_iter_type(&direct_iov), 3659 - direct_iov.iov_offset, 3660 - direct_iov.count); 3657 + "Couldn't get user pages (rc=%zd) iter type %d iov_offset %zd count %zd\n", 3658 + result, iov_iter_type(&direct_iov), 3659 + direct_iov.iov_offset, 3660 + direct_iov.count); 3661 3661 dump_stack(); 3662 3662 3663 3663 rc = result; ··· 4824 4828 } 4825 4829 *span = sis->pages; 4826 4830 4827 - printk_once(KERN_WARNING "Swap support over SMB3 is experimental\n"); 4831 + pr_warn_once("Swap support over SMB3 is experimental\n"); 4828 4832 4829 4833 /* 4830 4834 * TODO: consider adding ACL (or documenting how) to prevent other
+2 -2
fs/cifs/inode.c
··· 1155 1155 /* some servers mistakenly claim POSIX support */ 1156 1156 if (rc != -EOPNOTSUPP) 1157 1157 goto iget_no_retry; 1158 - cifs_dbg(VFS, "server does not support POSIX extensions"); 1158 + cifs_dbg(VFS, "server does not support POSIX extensions\n"); 1159 1159 tcon->unix_ext = false; 1160 1160 } 1161 1161 ··· 2010 2010 if (inode->i_mapping && inode->i_mapping->nrpages != 0) { 2011 2011 rc = invalidate_inode_pages2(inode->i_mapping); 2012 2012 if (rc) 2013 - cifs_dbg(VFS, "%s: could not invalidate inode %p\n", 2013 + cifs_dbg(VFS, "%s: Could not invalidate inode %p\n", 2014 2014 __func__, inode); 2015 2015 } 2016 2016
+6 -6
fs/cifs/misc.c
··· 424 424 425 425 if (data_offset > 426 426 len - sizeof(struct file_notify_information)) { 427 - cifs_dbg(FYI, "invalid data_offset %u\n", 427 + cifs_dbg(FYI, "Invalid data_offset %u\n", 428 428 data_offset); 429 429 return true; 430 430 } ··· 452 452 large dirty files cached on the client */ 453 453 if ((NT_STATUS_INVALID_HANDLE) == 454 454 le32_to_cpu(pSMB->hdr.Status.CifsError)) { 455 - cifs_dbg(FYI, "invalid handle on oplock break\n"); 455 + cifs_dbg(FYI, "Invalid handle on oplock break\n"); 456 456 return true; 457 457 } else if (ERRbadfid == 458 458 le16_to_cpu(pSMB->hdr.Status.DosError.Error)) { ··· 533 533 534 534 cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM; 535 535 cifs_sb->mnt_cifs_serverino_autodisabled = true; 536 - cifs_dbg(VFS, "Autodisabling the use of server inode numbers on %s.\n", 536 + cifs_dbg(VFS, "Autodisabling the use of server inode numbers on %s\n", 537 537 tcon ? tcon->treeName : "new server"); 538 - cifs_dbg(VFS, "The server doesn't seem to support them properly or the files might be on different servers (DFS).\n"); 538 + cifs_dbg(VFS, "The server doesn't seem to support them properly or the files might be on different servers (DFS)\n"); 539 539 cifs_dbg(VFS, "Hardlinks will not be recognized on this mount. Consider mounting with the \"noserverino\" option to silence this message.\n"); 540 540 541 541 } ··· 877 877 while (count && npages < max_pages) { 878 878 rc = iov_iter_get_pages(iter, pages, count, max_pages, &start); 879 879 if (rc < 0) { 880 - cifs_dbg(VFS, "couldn't get user pages (rc=%zd)\n", rc); 880 + cifs_dbg(VFS, "Couldn't get user pages (rc=%zd)\n", rc); 881 881 break; 882 882 } 883 883 ··· 936 936 937 937 *shash = crypto_alloc_shash(name, 0, 0); 938 938 if (IS_ERR(*shash)) { 939 - cifs_dbg(VFS, "could not allocate crypto %s\n", name); 939 + cifs_dbg(VFS, "Could not allocate crypto %s\n", name); 940 940 rc = PTR_ERR(*shash); 941 941 *shash = NULL; 942 942 *sdesc = NULL;
+3 -3
fs/cifs/netmisc.c
··· 957 957 sec = 2 * st->TwoSeconds; 958 958 min = st->Minutes; 959 959 if ((sec > 59) || (min > 59)) 960 - cifs_dbg(VFS, "illegal time min %d sec %lld\n", min, sec); 960 + cifs_dbg(VFS, "Invalid time min %d sec %lld\n", min, sec); 961 961 sec += (min * 60); 962 962 sec += 60 * 60 * st->Hours; 963 963 if (st->Hours > 24) 964 - cifs_dbg(VFS, "illegal hours %d\n", st->Hours); 964 + cifs_dbg(VFS, "Invalid hours %d\n", st->Hours); 965 965 day = sd->Day; 966 966 month = sd->Month; 967 967 if (day < 1 || day > 31 || month < 1 || month > 12) { 968 - cifs_dbg(VFS, "illegal date, month %d day: %d\n", month, day); 968 + cifs_dbg(VFS, "Invalid date, month %d day: %d\n", month, day); 969 969 day = clamp(day, 1, 31); 970 970 month = clamp(month, 1, 12); 971 971 }
+5 -5
fs/cifs/readdir.c
··· 53 53 return; 54 54 } 55 55 if (cf->invalidHandle) 56 - cifs_dbg(FYI, "invalid handle\n"); 56 + cifs_dbg(FYI, "Invalid handle\n"); 57 57 if (cf->srch_inf.endOfSearch) 58 58 cifs_dbg(FYI, "end of search\n"); 59 59 if (cf->srch_inf.emptyDir) ··· 246 246 */ 247 247 fattr->cf_mode = le32_to_cpu(info->Mode) & ~S_IFMT; 248 248 249 - cifs_dbg(FYI, "posix fattr: dev %d, reparse %d, mode %o", 249 + cifs_dbg(FYI, "posix fattr: dev %d, reparse %d, mode %o\n", 250 250 le32_to_cpu(info->DeviceId), 251 251 le32_to_cpu(info->ReparseTag), 252 252 le32_to_cpu(info->Mode)); ··· 478 478 u32 next_offset = le32_to_cpu(pDirInfo->NextEntryOffset); 479 479 480 480 if (old_entry + next_offset < old_entry) { 481 - cifs_dbg(VFS, "invalid offset %u\n", next_offset); 481 + cifs_dbg(VFS, "Invalid offset %u\n", next_offset); 482 482 return NULL; 483 483 } 484 484 new_entry = old_entry + next_offset; ··· 515 515 516 516 /* payload should have already been checked at this point */ 517 517 if (posix_info_parse(info, NULL, &parsed) < 0) { 518 - cifs_dbg(VFS, "invalid POSIX info payload"); 518 + cifs_dbg(VFS, "Invalid POSIX info payload\n"); 519 519 return; 520 520 } 521 521 ··· 968 968 } else if (current_entry != NULL) { 969 969 cifs_dbg(FYI, "entry %lld found\n", ctx->pos); 970 970 } else { 971 - cifs_dbg(FYI, "could not find entry\n"); 971 + cifs_dbg(FYI, "Could not find entry\n"); 972 972 goto rddir2_exit; 973 973 } 974 974 cifs_dbg(FYI, "loop through %d times filling dir for net buf %p\n",
+14 -14
fs/cifs/sess.c
··· 162 162 int rc; 163 163 unsigned int xid = get_xid(); 164 164 165 - cifs_dbg(FYI, "adding channel to ses %p (speed:%zu bps rdma:%s ", 166 - ses, iface->speed, iface->rdma_capable ? "yes" : "no"); 167 165 if (iface->sockaddr.ss_family == AF_INET) 168 - cifs_dbg(FYI, "ip:%pI4)\n", &ipv4->sin_addr); 166 + cifs_dbg(FYI, "adding channel to ses %p (speed:%zu bps rdma:%s ip:%pI4)\n", 167 + ses, iface->speed, iface->rdma_capable ? "yes" : "no", 168 + &ipv4->sin_addr); 169 169 else 170 - cifs_dbg(FYI, "ip:%pI6)\n", &ipv6->sin6_addr); 170 + cifs_dbg(FYI, "adding channel to ses %p (speed:%zu bps rdma:%s ip:%pI4)\n", 171 + ses, iface->speed, iface->rdma_capable ? "yes" : "no", 172 + &ipv6->sin6_addr); 171 173 172 174 /* 173 175 * Setup a smb_vol with mostly the same info as the existing ··· 571 569 tioffset = le32_to_cpu(pblob->TargetInfoArray.BufferOffset); 572 570 tilen = le16_to_cpu(pblob->TargetInfoArray.Length); 573 571 if (tioffset > blob_len || tioffset + tilen > blob_len) { 574 - cifs_dbg(VFS, "tioffset + tilen too high %u + %u", 575 - tioffset, tilen); 572 + cifs_dbg(VFS, "tioffset + tilen too high %u + %u\n", 573 + tioffset, tilen); 576 574 return -EINVAL; 577 575 } 578 576 if (tilen) { 579 577 ses->auth_key.response = kmemdup(bcc_ptr + tioffset, tilen, 580 578 GFP_KERNEL); 581 579 if (!ses->auth_key.response) { 582 - cifs_dbg(VFS, "Challenge target info alloc failure"); 580 + cifs_dbg(VFS, "Challenge target info alloc failure\n"); 583 581 return -ENOMEM; 584 582 } 585 583 ses->auth_key.len = tilen; ··· 1305 1303 * sending us a response in an expected form 1306 1304 */ 1307 1305 if (msg->version != CIFS_SPNEGO_UPCALL_VERSION) { 1308 - cifs_dbg(VFS, 1309 - "incorrect version of cifs.upcall (expected %d but got %d)", 1310 - CIFS_SPNEGO_UPCALL_VERSION, msg->version); 1306 + cifs_dbg(VFS, "incorrect version of cifs.upcall (expected %d but got %d)\n", 1307 + CIFS_SPNEGO_UPCALL_VERSION, msg->version); 1311 1308 rc = -EKEYREJECTED; 1312 1309 goto out_put_spnego_key; 1313 1310 } ··· 1314 1313 ses->auth_key.response = kmemdup(msg->data, msg->sesskey_len, 1315 1314 GFP_KERNEL); 1316 1315 if (!ses->auth_key.response) { 1317 - cifs_dbg(VFS, "Kerberos can't allocate (%u bytes) memory", 1318 - msg->sesskey_len); 1316 + cifs_dbg(VFS, "Kerberos can't allocate (%u bytes) memory\n", 1317 + msg->sesskey_len); 1319 1318 rc = -ENOMEM; 1320 1319 goto out_put_spnego_key; 1321 1320 } ··· 1658 1657 type = cifs_select_sectype(ses->server, ses->sectype); 1659 1658 cifs_dbg(FYI, "sess setup type %d\n", type); 1660 1659 if (type == Unspecified) { 1661 - cifs_dbg(VFS, 1662 - "Unable to select appropriate authentication method!"); 1660 + cifs_dbg(VFS, "Unable to select appropriate authentication method!\n"); 1663 1661 return -EINVAL; 1664 1662 } 1665 1663
+1 -1
fs/cifs/smb1ops.c
··· 247 247 /* check for plausible wct, bcc and t2 data and parm sizes */ 248 248 /* check for parm and data offset going beyond end of smb */ 249 249 if (pSMB->WordCount != 10) { /* coalesce_t2 depends on this */ 250 - cifs_dbg(FYI, "invalid transact2 word count\n"); 250 + cifs_dbg(FYI, "Invalid transact2 word count\n"); 251 251 return -EINVAL; 252 252 } 253 253
+1 -2
fs/cifs/smb2inode.c
··· 337 337 338 338 SMB2_open_free(&rqst[0]); 339 339 if (rc == -EREMCHG) { 340 - printk_once(KERN_WARNING "server share %s deleted\n", 341 - tcon->treeName); 340 + pr_warn_once("server share %s deleted\n", tcon->treeName); 342 341 tcon->need_reconnect = true; 343 342 } 344 343
+10 -10
fs/cifs/smb2misc.c
··· 110 110 /* Make sure that negotiate contexts start after gss security blob */ 111 111 nc_offset = le32_to_cpu(pneg_rsp->NegotiateContextOffset); 112 112 if (nc_offset < non_ctxlen) { 113 - printk_once(KERN_WARNING "invalid negotiate context offset\n"); 113 + pr_warn_once("Invalid negotiate context offset\n"); 114 114 return 0; 115 115 } 116 116 size_of_pad_before_neg_ctxts = nc_offset - non_ctxlen; 117 117 118 118 /* Verify that at least minimal negotiate contexts fit within frame */ 119 119 if (len < nc_offset + (neg_count * sizeof(struct smb2_neg_context))) { 120 - printk_once(KERN_WARNING "negotiate context goes beyond end\n"); 120 + pr_warn_once("negotiate context goes beyond end\n"); 121 121 return 0; 122 122 } 123 123 ··· 190 190 return 1; 191 191 192 192 if (shdr->StructureSize != SMB2_HEADER_STRUCTURE_SIZE) { 193 - cifs_dbg(VFS, "Illegal structure size %u\n", 193 + cifs_dbg(VFS, "Invalid structure size %u\n", 194 194 le16_to_cpu(shdr->StructureSize)); 195 195 return 1; 196 196 } 197 197 198 198 command = le16_to_cpu(shdr->Command); 199 199 if (command >= NUMBER_OF_SMB2_COMMANDS) { 200 - cifs_dbg(VFS, "Illegal SMB2 command %d\n", command); 200 + cifs_dbg(VFS, "Invalid SMB2 command %d\n", command); 201 201 return 1; 202 202 } 203 203 ··· 205 205 if (command != SMB2_OPLOCK_BREAK_HE && (shdr->Status == 0 || 206 206 pdu->StructureSize2 != SMB2_ERROR_STRUCTURE_SIZE2)) { 207 207 /* error packets have 9 byte structure size */ 208 - cifs_dbg(VFS, "Illegal response size %u for command %d\n", 208 + cifs_dbg(VFS, "Invalid response size %u for command %d\n", 209 209 le16_to_cpu(pdu->StructureSize2), command); 210 210 return 1; 211 211 } else if (command == SMB2_OPLOCK_BREAK_HE ··· 213 213 && (le16_to_cpu(pdu->StructureSize2) != 44) 214 214 && (le16_to_cpu(pdu->StructureSize2) != 36)) { 215 215 /* special case for SMB2.1 lease break message */ 216 - cifs_dbg(VFS, "Illegal response size %d for oplock break\n", 216 + cifs_dbg(VFS, "Invalid response size %d for oplock break\n", 217 217 le16_to_cpu(pdu->StructureSize2)); 218 218 return 1; 219 219 } ··· 864 864 d = server->secmech.sdescsha512; 865 865 rc = crypto_shash_init(&d->shash); 866 866 if (rc) { 867 - cifs_dbg(VFS, "%s: could not init sha512 shash\n", __func__); 867 + cifs_dbg(VFS, "%s: Could not init sha512 shash\n", __func__); 868 868 return rc; 869 869 } 870 870 871 871 rc = crypto_shash_update(&d->shash, ses->preauth_sha_hash, 872 872 SMB2_PREAUTH_HASH_SIZE); 873 873 if (rc) { 874 - cifs_dbg(VFS, "%s: could not update sha512 shash\n", __func__); 874 + cifs_dbg(VFS, "%s: Could not update sha512 shash\n", __func__); 875 875 return rc; 876 876 } 877 877 ··· 879 879 rc = crypto_shash_update(&d->shash, 880 880 iov[i].iov_base, iov[i].iov_len); 881 881 if (rc) { 882 - cifs_dbg(VFS, "%s: could not update sha512 shash\n", 882 + cifs_dbg(VFS, "%s: Could not update sha512 shash\n", 883 883 __func__); 884 884 return rc; 885 885 } ··· 887 887 888 888 rc = crypto_shash_final(&d->shash, ses->preauth_sha_hash); 889 889 if (rc) { 890 - cifs_dbg(VFS, "%s: could not finalize sha512 shash\n", 890 + cifs_dbg(VFS, "%s: Could not finalize sha512 shash\n", 891 891 __func__); 892 892 return rc; 893 893 }
+16 -15
fs/cifs/smb2ops.c
··· 79 79 80 80 if (*val > 65000) { 81 81 *val = 65000; /* Don't get near 64K credits, avoid srv bugs */ 82 - printk_once(KERN_WARNING "server overflowed SMB3 credits\n"); 82 + pr_warn_once("server overflowed SMB3 credits\n"); 83 83 } 84 84 server->in_flight--; 85 85 if (server->in_flight == 0 && (optype & CIFS_OP_MASK) != CIFS_NEG_OP) ··· 767 767 if (rc) { 768 768 if (rc == -EREMCHG) { 769 769 tcon->need_reconnect = true; 770 - printk_once(KERN_WARNING "server share %s deleted\n", 771 - tcon->treeName); 770 + pr_warn_once("server share %s deleted\n", 771 + tcon->treeName); 772 772 } 773 773 goto oshr_exit; 774 774 } ··· 1601 1601 qi.input_buffer_length, 1602 1602 qi.output_buffer_length, buffer); 1603 1603 } else { /* unknown flags */ 1604 - cifs_tcon_dbg(VFS, "invalid passthru query flags: 0x%x\n", qi.flags); 1604 + cifs_tcon_dbg(VFS, "Invalid passthru query flags: 0x%x\n", 1605 + qi.flags); 1605 1606 rc = -EINVAL; 1606 1607 } 1607 1608 ··· 1732 1731 if (rc == 0) { 1733 1732 if (ret_data_len != 1734 1733 sizeof(struct copychunk_ioctl_rsp)) { 1735 - cifs_tcon_dbg(VFS, "invalid cchunk response size\n"); 1734 + cifs_tcon_dbg(VFS, "Invalid cchunk response size\n"); 1736 1735 rc = -EIO; 1737 1736 goto cchunk_out; 1738 1737 } ··· 1746 1745 */ 1747 1746 if (le32_to_cpu(retbuf->TotalBytesWritten) > 1748 1747 le32_to_cpu(pcchunk->Length)) { 1749 - cifs_tcon_dbg(VFS, "invalid copy chunk response\n"); 1748 + cifs_tcon_dbg(VFS, "Invalid copy chunk response\n"); 1750 1749 rc = -EIO; 1751 1750 goto cchunk_out; 1752 1751 } 1753 1752 if (le32_to_cpu(retbuf->ChunksWritten) != 1) { 1754 - cifs_tcon_dbg(VFS, "invalid num chunks written\n"); 1753 + cifs_tcon_dbg(VFS, "Invalid num chunks written\n"); 1755 1754 rc = -EIO; 1756 1755 goto cchunk_out; 1757 1756 } ··· 2485 2484 free_rsp_buf(resp_buftype[1], rsp_iov[1].iov_base); 2486 2485 if (rc == -EREMCHG) { 2487 2486 tcon->need_reconnect = true; 2488 - printk_once(KERN_WARNING "server share %s deleted\n", 2489 - tcon->treeName); 2487 + pr_warn_once("server share %s deleted\n", 2488 + tcon->treeName); 2490 2489 } 2491 2490 goto qic_exit; 2492 2491 } ··· 2766 2765 struct cifs_sb_info *cifs_sb) 2767 2766 { 2768 2767 if (plen < sizeof(struct reparse_data_buffer)) { 2769 - cifs_dbg(VFS, "reparse buffer is too small. Must be " 2770 - "at least 8 bytes but was %d\n", plen); 2768 + cifs_dbg(VFS, "reparse buffer is too small. Must be at least 8 bytes but was %d\n", 2769 + plen); 2771 2770 return -EIO; 2772 2771 } 2773 2772 2774 2773 if (plen < le16_to_cpu(buf->ReparseDataLength) + 2775 2774 sizeof(struct reparse_data_buffer)) { 2776 - cifs_dbg(VFS, "srv returned invalid reparse buf " 2777 - "length: %d\n", plen); 2775 + cifs_dbg(VFS, "srv returned invalid reparse buf length: %d\n", 2776 + plen); 2778 2777 return -EIO; 2779 2778 } 2780 2779 ··· 2789 2788 (struct reparse_symlink_data_buffer *)buf, 2790 2789 plen, target_path, cifs_sb); 2791 2790 default: 2792 - cifs_dbg(VFS, "srv returned unknown symlink buffer " 2793 - "tag:0x%08x\n", le32_to_cpu(buf->ReparseTag)); 2791 + cifs_dbg(VFS, "srv returned unknown symlink buffer tag:0x%08x\n", 2792 + le32_to_cpu(buf->ReparseTag)); 2794 2793 return -EOPNOTSUPP; 2795 2794 } 2796 2795 }
+33 -37
fs/cifs/smb2pdu.c
··· 334 334 (server->tcpStatus != CifsNeedReconnect), 335 335 10 * HZ); 336 336 if (rc < 0) { 337 - cifs_dbg(FYI, "%s: aborting reconnect due to a received" 338 - " signal by the process\n", __func__); 337 + cifs_dbg(FYI, "%s: aborting reconnect due to a received signal by the process\n", 338 + __func__); 339 339 return -ERESTARTSYS; 340 340 } 341 341 ··· 404 404 cifs_dbg(FYI, "reconnect tcon rc = %d\n", rc); 405 405 if (rc) { 406 406 /* If sess reconnected but tcon didn't, something strange ... */ 407 - printk_once(KERN_WARNING "reconnect tcon failed rc = %d\n", rc); 407 + pr_warn_once("reconnect tcon failed rc = %d\n", rc); 408 408 goto out; 409 409 } 410 410 ··· 646 646 647 647 /* If invalid preauth context warn but use what we requested, SHA-512 */ 648 648 if (len < MIN_PREAUTH_CTXT_DATA_LEN) { 649 - printk_once(KERN_WARNING "server sent bad preauth context\n"); 649 + pr_warn_once("server sent bad preauth context\n"); 650 650 return; 651 651 } 652 652 if (le16_to_cpu(ctxt->HashAlgorithmCount) != 1) 653 - printk_once(KERN_WARNING "illegal SMB3 hash algorithm count\n"); 653 + pr_warn_once("Invalid SMB3 hash algorithm count\n"); 654 654 if (ctxt->HashAlgorithms != SMB2_PREAUTH_INTEGRITY_SHA512) 655 - printk_once(KERN_WARNING "unknown SMB3 hash algorithm\n"); 655 + pr_warn_once("unknown SMB3 hash algorithm\n"); 656 656 } 657 657 658 658 static void decode_compress_ctx(struct TCP_Server_Info *server, ··· 662 662 663 663 /* sizeof compress context is a one element compression capbility struct */ 664 664 if (len < 10) { 665 - printk_once(KERN_WARNING "server sent bad compression cntxt\n"); 665 + pr_warn_once("server sent bad compression cntxt\n"); 666 666 return; 667 667 } 668 668 if (le16_to_cpu(ctxt->CompressionAlgorithmCount) != 1) { 669 - printk_once(KERN_WARNING "illegal SMB3 compress algorithm count\n"); 669 + pr_warn_once("Invalid SMB3 compress algorithm count\n"); 670 670 return; 671 671 } 672 672 if (le16_to_cpu(ctxt->CompressionAlgorithms[0]) > 3) { 673 - printk_once(KERN_WARNING "unknown compression algorithm\n"); 673 + pr_warn_once("unknown compression algorithm\n"); 674 674 return; 675 675 } 676 676 server->compress_algorithm = ctxt->CompressionAlgorithms[0]; ··· 683 683 684 684 cifs_dbg(FYI, "decode SMB3.11 encryption neg context of len %d\n", len); 685 685 if (len < MIN_ENCRYPT_CTXT_DATA_LEN) { 686 - printk_once(KERN_WARNING "server sent bad crypto ctxt len\n"); 686 + pr_warn_once("server sent bad crypto ctxt len\n"); 687 687 return -EINVAL; 688 688 } 689 689 690 690 if (le16_to_cpu(ctxt->CipherCount) != 1) { 691 - printk_once(KERN_WARNING "illegal SMB3.11 cipher count\n"); 691 + pr_warn_once("Invalid SMB3.11 cipher count\n"); 692 692 return -EINVAL; 693 693 } 694 694 cifs_dbg(FYI, "SMB311 cipher type:%d\n", le16_to_cpu(ctxt->Ciphers[0])); 695 695 if ((ctxt->Ciphers[0] != SMB2_ENCRYPTION_AES128_CCM) && 696 696 (ctxt->Ciphers[0] != SMB2_ENCRYPTION_AES128_GCM)) { 697 - printk_once(KERN_WARNING "invalid SMB3.11 cipher returned\n"); 697 + pr_warn_once("Invalid SMB3.11 cipher returned\n"); 698 698 return -EINVAL; 699 699 } 700 700 server->cipher_type = ctxt->Ciphers[0]; ··· 794 794 buf->Name[14] = 0xCD; 795 795 buf->Name[15] = 0x7C; 796 796 buf->Mode = cpu_to_le32(mode); 797 - cifs_dbg(FYI, "mode on posix create 0%o", mode); 797 + cifs_dbg(FYI, "mode on posix create 0%o\n", mode); 798 798 return buf; 799 799 } 800 800 ··· 806 806 807 807 iov[num].iov_base = create_posix_buf(mode); 808 808 if (mode == ACL_NO_MODE) 809 - cifs_dbg(FYI, "illegal mode\n"); 809 + cifs_dbg(FYI, "Invalid mode\n"); 810 810 if (iov[num].iov_base == NULL) 811 811 return -ENOMEM; 812 812 iov[num].iov_len = sizeof(struct create_posix); ··· 924 924 * cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]); 925 925 */ 926 926 if (rc == -EOPNOTSUPP) { 927 - cifs_server_dbg(VFS, "Dialect not supported by server. Consider " 928 - "specifying vers=1.0 or vers=2.0 on mount for accessing" 929 - " older servers\n"); 927 + cifs_server_dbg(VFS, "Dialect not supported by server. Consider specifying vers=1.0 or vers=2.0 on mount for accessing older servers\n"); 930 928 goto neg_exit; 931 929 } else if (rc != 0) 932 930 goto neg_exit; ··· 957 959 } else if (le16_to_cpu(rsp->DialectRevision) != 958 960 server->vals->protocol_id) { 959 961 /* if requested single dialect ensure returned dialect matched */ 960 - cifs_server_dbg(VFS, "Illegal 0x%x dialect returned: not requested\n", 961 - le16_to_cpu(rsp->DialectRevision)); 962 + cifs_server_dbg(VFS, "Invalid 0x%x dialect returned: not requested\n", 963 + le16_to_cpu(rsp->DialectRevision)); 962 964 return -EIO; 963 965 } 964 966 ··· 975 977 else if (rsp->DialectRevision == cpu_to_le16(SMB311_PROT_ID)) 976 978 cifs_dbg(FYI, "negotiated smb3.1.1 dialect\n"); 977 979 else { 978 - cifs_server_dbg(VFS, "Illegal dialect returned by server 0x%x\n", 979 - le16_to_cpu(rsp->DialectRevision)); 980 + cifs_server_dbg(VFS, "Invalid dialect returned by server 0x%x\n", 981 + le16_to_cpu(rsp->DialectRevision)); 980 982 rc = -EIO; 981 983 goto neg_exit; 982 984 } ··· 1134 1136 rc = 0; 1135 1137 goto out_free_inbuf; 1136 1138 } else if (rc != 0) { 1137 - cifs_tcon_dbg(VFS, "validate protocol negotiate failed: %d\n", rc); 1139 + cifs_tcon_dbg(VFS, "validate protocol negotiate failed: %d\n", 1140 + rc); 1138 1141 rc = -EIO; 1139 1142 goto out_free_inbuf; 1140 1143 } 1141 1144 1142 1145 rc = -EIO; 1143 1146 if (rsplen != sizeof(*pneg_rsp)) { 1144 - cifs_tcon_dbg(VFS, "invalid protocol negotiate response size: %d\n", 1145 - rsplen); 1147 + cifs_tcon_dbg(VFS, "Invalid protocol negotiate response size: %d\n", 1148 + rsplen); 1146 1149 1147 1150 /* relax check since Mac returns max bufsize allowed on ioctl */ 1148 1151 if (rsplen > CIFSMaxBufSize || rsplen < sizeof(*pneg_rsp)) ··· 1376 1377 * sending us a response in an expected form 1377 1378 */ 1378 1379 if (msg->version != CIFS_SPNEGO_UPCALL_VERSION) { 1379 - cifs_dbg(VFS, 1380 - "bad cifs.upcall version. Expected %d got %d", 1381 - CIFS_SPNEGO_UPCALL_VERSION, msg->version); 1380 + cifs_dbg(VFS, "bad cifs.upcall version. Expected %d got %d\n", 1381 + CIFS_SPNEGO_UPCALL_VERSION, msg->version); 1382 1382 rc = -EKEYREJECTED; 1383 1383 goto out_put_spnego_key; 1384 1384 } ··· 1387 1389 ses->auth_key.response = kmemdup(msg->data, msg->sesskey_len, 1388 1390 GFP_KERNEL); 1389 1391 if (!ses->auth_key.response) { 1390 - cifs_dbg(VFS, 1391 - "Kerberos can't allocate (%u bytes) memory", 1392 + cifs_dbg(VFS, "Kerberos can't allocate (%u bytes) memory\n", 1392 1393 msg->sesskey_len); 1393 1394 rc = -ENOMEM; 1394 1395 goto out_put_spnego_key; ··· 1601 1604 type = smb2_select_sectype(cifs_ses_server(ses), ses->sectype); 1602 1605 cifs_dbg(FYI, "sess setup type %d\n", type); 1603 1606 if (type == Unspecified) { 1604 - cifs_dbg(VFS, 1605 - "Unable to select appropriate authentication method!"); 1607 + cifs_dbg(VFS, "Unable to select appropriate authentication method!\n"); 1606 1608 return -EINVAL; 1607 1609 } 1608 1610 ··· 2828 2832 trace_smb3_open_err(xid, tcon->tid, ses->Suid, 2829 2833 oparms->create_options, oparms->desired_access, rc); 2830 2834 if (rc == -EREMCHG) { 2831 - printk_once(KERN_WARNING "server share %s deleted\n", 2832 - tcon->treeName); 2835 + pr_warn_once("server share %s deleted\n", 2836 + tcon->treeName); 2833 2837 tcon->need_reconnect = true; 2834 2838 } 2835 2839 goto creat_exit; ··· 3241 3245 } 3242 3246 3243 3247 if ((begin_of_buf > end_of_smb) || (end_of_buf > end_of_smb)) { 3244 - cifs_dbg(VFS, "illegal server response, bad offset to data\n"); 3248 + cifs_dbg(VFS, "Invalid server response, bad offset to data\n"); 3245 3249 return -EINVAL; 3246 3250 } 3247 3251 ··· 4124 4128 tcon->tid, tcon->ses->Suid, wdata->offset, 4125 4129 wdata->bytes, wdata->result); 4126 4130 if (wdata->result == -ENOSPC) 4127 - printk_once(KERN_WARNING "Out of space writing to %s\n", 4128 - tcon->treeName); 4131 + pr_warn_once("Out of space writing to %s\n", 4132 + tcon->treeName); 4129 4133 } else 4130 4134 trace_smb3_write_done(0 /* no xid */, 4131 4135 wdata->cfile->fid.persistent_fid, ··· 4648 4652 else if (resp_buftype == CIFS_SMALL_BUFFER) 4649 4653 srch_inf->smallBuf = true; 4650 4654 else 4651 - cifs_tcon_dbg(VFS, "illegal search buffer type\n"); 4655 + cifs_tcon_dbg(VFS, "Invalid search buffer type\n"); 4652 4656 4653 4657 return 0; 4654 4658 }
+66 -99
fs/cifs/smbdirect.c
··· 294 294 295 295 static void dump_smbd_negotiate_resp(struct smbd_negotiate_resp *resp) 296 296 { 297 - log_rdma_event(INFO, "resp message min_version %u max_version %u " 298 - "negotiated_version %u credits_requested %u " 299 - "credits_granted %u status %u max_readwrite_size %u " 300 - "preferred_send_size %u max_receive_size %u " 301 - "max_fragmented_size %u\n", 302 - resp->min_version, resp->max_version, resp->negotiated_version, 303 - resp->credits_requested, resp->credits_granted, resp->status, 304 - resp->max_readwrite_size, resp->preferred_send_size, 305 - resp->max_receive_size, resp->max_fragmented_size); 297 + log_rdma_event(INFO, "resp message min_version %u max_version %u negotiated_version %u credits_requested %u credits_granted %u status %u max_readwrite_size %u preferred_send_size %u max_receive_size %u max_fragmented_size %u\n", 298 + resp->min_version, resp->max_version, 299 + resp->negotiated_version, resp->credits_requested, 300 + resp->credits_granted, resp->status, 301 + resp->max_readwrite_size, resp->preferred_send_size, 302 + resp->max_receive_size, resp->max_fragmented_size); 306 303 } 307 304 308 305 /* ··· 447 450 struct smbd_connection *info = response->info; 448 451 int data_length = 0; 449 452 450 - log_rdma_recv(INFO, "response=%p type=%d wc status=%d wc opcode %d " 451 - "byte_len=%d pkey_index=%x\n", 452 - response, response->type, wc->status, wc->opcode, 453 - wc->byte_len, wc->pkey_index); 453 + log_rdma_recv(INFO, "response=%p type=%d wc status=%d wc opcode %d byte_len=%d pkey_index=%x\n", 454 + response, response->type, wc->status, wc->opcode, 455 + wc->byte_len, wc->pkey_index); 454 456 455 457 if (wc->status != IB_WC_SUCCESS || wc->opcode != IB_WC_RECV) { 456 458 log_rdma_recv(INFO, "wc->status=%d opcode=%d\n", ··· 515 519 wake_up_interruptible(&info->wait_send_queue); 516 520 } 517 521 518 - log_incoming(INFO, "data flags %d data_offset %d " 519 - "data_length %d remaining_data_length %d\n", 520 - le16_to_cpu(data_transfer->flags), 521 - le32_to_cpu(data_transfer->data_offset), 522 - le32_to_cpu(data_transfer->data_length), 523 - le32_to_cpu(data_transfer->remaining_data_length)); 522 + log_incoming(INFO, "data flags %d data_offset %d data_length %d remaining_data_length %d\n", 523 + le16_to_cpu(data_transfer->flags), 524 + le32_to_cpu(data_transfer->data_offset), 525 + le32_to_cpu(data_transfer->data_length), 526 + le32_to_cpu(data_transfer->remaining_data_length)); 524 527 525 528 /* Send a KEEP_ALIVE response right away if requested */ 526 529 info->keep_alive_requested = KEEP_ALIVE_NONE; ··· 627 632 } 628 633 629 634 if (!frwr_is_supported(&info->id->device->attrs)) { 630 - log_rdma_event(ERR, 631 - "Fast Registration Work Requests " 632 - "(FRWR) is not supported\n"); 633 - log_rdma_event(ERR, 634 - "Device capability flags = %llx " 635 - "max_fast_reg_page_list_len = %u\n", 636 - info->id->device->attrs.device_cap_flags, 637 - info->id->device->attrs.max_fast_reg_page_list_len); 635 + log_rdma_event(ERR, "Fast Registration Work Requests (FRWR) is not supported\n"); 636 + log_rdma_event(ERR, "Device capability flags = %llx max_fast_reg_page_list_len = %u\n", 637 + info->id->device->attrs.device_cap_flags, 638 + info->id->device->attrs.max_fast_reg_page_list_len); 638 639 rc = -EPROTONOSUPPORT; 639 640 goto out2; 640 641 } ··· 889 898 packet->remaining_data_length = cpu_to_le32(remaining_data_length); 890 899 packet->padding = 0; 891 900 892 - log_outgoing(INFO, "credits_requested=%d credits_granted=%d " 893 - "data_offset=%d data_length=%d remaining_data_length=%d\n", 894 - le16_to_cpu(packet->credits_requested), 895 - le16_to_cpu(packet->credits_granted), 896 - le32_to_cpu(packet->data_offset), 897 - le32_to_cpu(packet->data_length), 898 - le32_to_cpu(packet->remaining_data_length)); 901 + log_outgoing(INFO, "credits_requested=%d credits_granted=%d data_offset=%d data_length=%d remaining_data_length=%d\n", 902 + le16_to_cpu(packet->credits_requested), 903 + le16_to_cpu(packet->credits_granted), 904 + le32_to_cpu(packet->data_offset), 905 + le32_to_cpu(packet->data_length), 906 + le32_to_cpu(packet->remaining_data_length)); 899 907 900 908 /* Map the packet to DMA */ 901 909 header_length = sizeof(struct smbd_data_transfer); ··· 1068 1078 1069 1079 response->type = SMBD_NEGOTIATE_RESP; 1070 1080 rc = smbd_post_recv(info, response); 1071 - log_rdma_event(INFO, 1072 - "smbd_post_recv rc=%d iov.addr=%llx iov.length=%x " 1073 - "iov.lkey=%x\n", 1074 - rc, response->sge.addr, 1075 - response->sge.length, response->sge.lkey); 1081 + log_rdma_event(INFO, "smbd_post_recv rc=%d iov.addr=%llx iov.length=%x iov.lkey=%x\n", 1082 + rc, response->sge.addr, 1083 + response->sge.length, response->sge.lkey); 1076 1084 if (rc) 1077 1085 return rc; 1078 1086 ··· 1528 1540 1529 1541 if (smbd_send_credit_target > info->id->device->attrs.max_cqe || 1530 1542 smbd_send_credit_target > info->id->device->attrs.max_qp_wr) { 1531 - log_rdma_event(ERR, 1532 - "consider lowering send_credit_target = %d. " 1533 - "Possible CQE overrun, device " 1534 - "reporting max_cpe %d max_qp_wr %d\n", 1535 - smbd_send_credit_target, 1536 - info->id->device->attrs.max_cqe, 1537 - info->id->device->attrs.max_qp_wr); 1543 + log_rdma_event(ERR, "consider lowering send_credit_target = %d. Possible CQE overrun, device reporting max_cpe %d max_qp_wr %d\n", 1544 + smbd_send_credit_target, 1545 + info->id->device->attrs.max_cqe, 1546 + info->id->device->attrs.max_qp_wr); 1538 1547 goto config_failed; 1539 1548 } 1540 1549 1541 1550 if (smbd_receive_credit_max > info->id->device->attrs.max_cqe || 1542 1551 smbd_receive_credit_max > info->id->device->attrs.max_qp_wr) { 1543 - log_rdma_event(ERR, 1544 - "consider lowering receive_credit_max = %d. " 1545 - "Possible CQE overrun, device " 1546 - "reporting max_cpe %d max_qp_wr %d\n", 1547 - smbd_receive_credit_max, 1548 - info->id->device->attrs.max_cqe, 1549 - info->id->device->attrs.max_qp_wr); 1552 + log_rdma_event(ERR, "consider lowering receive_credit_max = %d. Possible CQE overrun, device reporting max_cpe %d max_qp_wr %d\n", 1553 + smbd_receive_credit_max, 1554 + info->id->device->attrs.max_cqe, 1555 + info->id->device->attrs.max_qp_wr); 1550 1556 goto config_failed; 1551 1557 } 1552 1558 ··· 1847 1865 to_read -= to_copy; 1848 1866 data_read += to_copy; 1849 1867 1850 - log_read(INFO, "_get_first_reassembly memcpy %d bytes " 1851 - "data_transfer_length-offset=%d after that " 1852 - "to_read=%d data_read=%d offset=%d\n", 1853 - to_copy, data_length - offset, 1854 - to_read, data_read, offset); 1868 + log_read(INFO, "_get_first_reassembly memcpy %d bytes data_transfer_length-offset=%d after that to_read=%d data_read=%d offset=%d\n", 1869 + to_copy, data_length - offset, 1870 + to_read, data_read, offset); 1855 1871 } 1856 1872 1857 1873 spin_lock_irq(&info->reassembly_queue_lock); ··· 1858 1878 spin_unlock_irq(&info->reassembly_queue_lock); 1859 1879 1860 1880 info->first_entry_offset = offset; 1861 - log_read(INFO, "returning to thread data_read=%d " 1862 - "reassembly_data_length=%d first_entry_offset=%d\n", 1863 - data_read, info->reassembly_data_length, 1864 - info->first_entry_offset); 1881 + log_read(INFO, "returning to thread data_read=%d reassembly_data_length=%d first_entry_offset=%d\n", 1882 + data_read, info->reassembly_data_length, 1883 + info->first_entry_offset); 1865 1884 read_rfc1002_done: 1866 1885 return data_read; 1867 1886 } ··· 1931 1952 1932 1953 if (iov_iter_rw(&msg->msg_iter) == WRITE) { 1933 1954 /* It's a bug in upper layer to get there */ 1934 - cifs_dbg(VFS, "CIFS: invalid msg iter dir %u\n", 1955 + cifs_dbg(VFS, "Invalid msg iter dir %u\n", 1935 1956 iov_iter_rw(&msg->msg_iter)); 1936 1957 rc = -EINVAL; 1937 1958 goto out; ··· 1953 1974 1954 1975 default: 1955 1976 /* It's a bug in upper layer to get there */ 1956 - cifs_dbg(VFS, "CIFS: invalid msg type %d\n", 1977 + cifs_dbg(VFS, "Invalid msg type %d\n", 1957 1978 iov_iter_type(&msg->msg_iter)); 1958 1979 rc = -EINVAL; 1959 1980 } ··· 2022 2043 dump_smb(iov[i].iov_base, iov[i].iov_len); 2023 2044 2024 2045 2025 - log_write(INFO, "rqst_idx=%d nvec=%d rqst->rq_npages=%d rq_pagesz=%d " 2026 - "rq_tailsz=%d buflen=%lu\n", 2027 - rqst_idx, rqst->rq_nvec, rqst->rq_npages, rqst->rq_pagesz, 2028 - rqst->rq_tailsz, smb_rqst_len(server, rqst)); 2046 + log_write(INFO, "rqst_idx=%d nvec=%d rqst->rq_npages=%d rq_pagesz=%d rq_tailsz=%d buflen=%lu\n", 2047 + rqst_idx, rqst->rq_nvec, rqst->rq_npages, rqst->rq_pagesz, 2048 + rqst->rq_tailsz, smb_rqst_len(server, rqst)); 2029 2049 2030 2050 start = i = 0; 2031 2051 buflen = 0; ··· 2034 2056 if (i > start) { 2035 2057 remaining_data_length -= 2036 2058 (buflen-iov[i].iov_len); 2037 - log_write(INFO, "sending iov[] from start=%d " 2038 - "i=%d nvecs=%d " 2039 - "remaining_data_length=%d\n", 2040 - start, i, i-start, 2041 - remaining_data_length); 2059 + log_write(INFO, "sending iov[] from start=%d i=%d nvecs=%d remaining_data_length=%d\n", 2060 + start, i, i - start, 2061 + remaining_data_length); 2042 2062 rc = smbd_post_send_data( 2043 2063 info, &iov[start], i-start, 2044 2064 remaining_data_length); ··· 2045 2069 } else { 2046 2070 /* iov[start] is too big, break it */ 2047 2071 nvecs = (buflen+max_iov_size-1)/max_iov_size; 2048 - log_write(INFO, "iov[%d] iov_base=%p buflen=%d" 2049 - " break to %d vectors\n", 2050 - start, iov[start].iov_base, 2051 - buflen, nvecs); 2072 + log_write(INFO, "iov[%d] iov_base=%p buflen=%d break to %d vectors\n", 2073 + start, iov[start].iov_base, 2074 + buflen, nvecs); 2052 2075 for (j = 0; j < nvecs; j++) { 2053 2076 vec.iov_base = 2054 2077 (char *)iov[start].iov_base + ··· 2059 2084 max_iov_size*(nvecs-1); 2060 2085 remaining_data_length -= vec.iov_len; 2061 2086 log_write(INFO, 2062 - "sending vec j=%d iov_base=%p" 2063 - " iov_len=%zu " 2064 - "remaining_data_length=%d\n", 2065 - j, vec.iov_base, vec.iov_len, 2066 - remaining_data_length); 2087 + "sending vec j=%d iov_base=%p iov_len=%zu remaining_data_length=%d\n", 2088 + j, vec.iov_base, vec.iov_len, 2089 + remaining_data_length); 2067 2090 rc = smbd_post_send_data( 2068 2091 info, &vec, 1, 2069 2092 remaining_data_length); ··· 2079 2106 if (i == rqst->rq_nvec) { 2080 2107 /* send out all remaining vecs */ 2081 2108 remaining_data_length -= buflen; 2082 - log_write(INFO, 2083 - "sending iov[] from start=%d i=%d " 2084 - "nvecs=%d remaining_data_length=%d\n", 2085 - start, i, i-start, 2086 - remaining_data_length); 2109 + log_write(INFO, "sending iov[] from start=%d i=%d nvecs=%d remaining_data_length=%d\n", 2110 + start, i, i - start, 2111 + remaining_data_length); 2087 2112 rc = smbd_post_send_data(info, &iov[start], 2088 2113 i-start, remaining_data_length); 2089 2114 if (rc) ··· 2105 2134 if (j == nvecs-1) 2106 2135 size = buflen - j*max_iov_size; 2107 2136 remaining_data_length -= size; 2108 - log_write(INFO, "sending pages i=%d offset=%d size=%d" 2109 - " remaining_data_length=%d\n", 2110 - i, j*max_iov_size+offset, size, 2111 - remaining_data_length); 2137 + log_write(INFO, "sending pages i=%d offset=%d size=%d remaining_data_length=%d\n", 2138 + i, j * max_iov_size + offset, size, 2139 + remaining_data_length); 2112 2140 rc = smbd_post_send_page( 2113 2141 info, rqst->rq_pages[i], 2114 2142 j*max_iov_size + offset, ··· 2181 2211 info->pd, info->mr_type, 2182 2212 info->max_frmr_depth); 2183 2213 if (IS_ERR(smbdirect_mr->mr)) { 2184 - log_rdma_mr(ERR, 2185 - "ib_alloc_mr failed mr_type=%x " 2186 - "max_frmr_depth=%x\n", 2187 - info->mr_type, 2188 - info->max_frmr_depth); 2214 + log_rdma_mr(ERR, "ib_alloc_mr failed mr_type=%x max_frmr_depth=%x\n", 2215 + info->mr_type, 2216 + info->max_frmr_depth); 2189 2217 smbd_disconnect_rdma_connection(info); 2190 2218 continue; 2191 2219 } ··· 2246 2278 smbdirect_mr->mr = ib_alloc_mr(info->pd, info->mr_type, 2247 2279 info->max_frmr_depth); 2248 2280 if (IS_ERR(smbdirect_mr->mr)) { 2249 - log_rdma_mr(ERR, "ib_alloc_mr failed mr_type=%x " 2250 - "max_frmr_depth=%x\n", 2251 - info->mr_type, info->max_frmr_depth); 2281 + log_rdma_mr(ERR, "ib_alloc_mr failed mr_type=%x max_frmr_depth=%x\n", 2282 + info->mr_type, info->max_frmr_depth); 2252 2283 goto out; 2253 2284 } 2254 2285 smbdirect_mr->sgl = kcalloc(
+12 -13
fs/cifs/transport.c
··· 112 112 #ifdef CONFIG_CIFS_STATS2 113 113 now = jiffies; 114 114 if (now < midEntry->when_alloc) 115 - cifs_server_dbg(VFS, "invalid mid allocation time\n"); 115 + cifs_server_dbg(VFS, "Invalid mid allocation time\n"); 116 116 roundtrip_time = now - midEntry->when_alloc; 117 117 118 118 if (smb_cmd < NUMBER_OF_SMB2_COMMANDS) { ··· 151 151 trace_smb3_slow_rsp(smb_cmd, midEntry->mid, midEntry->pid, 152 152 midEntry->when_sent, midEntry->when_received); 153 153 if (cifsFYI & CIFS_TIMER) { 154 - pr_debug(" CIFS slow rsp: cmd %d mid %llu", 155 - midEntry->command, midEntry->mid); 156 - cifs_info(" A: 0x%lx S: 0x%lx R: 0x%lx\n", 157 - now - midEntry->when_alloc, 158 - now - midEntry->when_sent, 159 - now - midEntry->when_received); 154 + pr_debug("slow rsp: cmd %d mid %llu", 155 + midEntry->command, midEntry->mid); 156 + cifs_info("A: 0x%lx S: 0x%lx R: 0x%lx\n", 157 + now - midEntry->when_alloc, 158 + now - midEntry->when_sent, 159 + now - midEntry->when_received); 160 160 } 161 161 } 162 162 #endif ··· 477 477 return -ENOMEM; 478 478 479 479 if (!server->ops->init_transform_rq) { 480 - cifs_server_dbg(VFS, "Encryption requested but transform " 481 - "callback is missing\n"); 480 + cifs_server_dbg(VFS, "Encryption requested but transform callback is missing\n"); 482 481 return -EIO; 483 482 } 484 483 ··· 1299 1300 use ses->maxReq */ 1300 1301 1301 1302 if (len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) { 1302 - cifs_server_dbg(VFS, "Illegal length, greater than maximum frame, %d\n", 1303 - len); 1303 + cifs_server_dbg(VFS, "Invalid length, greater than maximum frame, %d\n", 1304 + len); 1304 1305 return -EIO; 1305 1306 } 1306 1307 ··· 1440 1441 use ses->maxReq */ 1441 1442 1442 1443 if (len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) { 1443 - cifs_tcon_dbg(VFS, "Illegal length, greater than maximum frame, %d\n", 1444 - len); 1444 + cifs_tcon_dbg(VFS, "Invalid length, greater than maximum frame, %d\n", 1445 + len); 1445 1446 return -EIO; 1446 1447 } 1447 1448