Commit 3803d5e4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag '5.8-rc-smb3-fixes-part-1' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs updates from Steve French:
 "22 changesets, 2 for stable.

  Includes big performance improvement for large i/o when using
  multichannel, also includes DFS fixes"

* tag '5.8-rc-smb3-fixes-part-1' of git://git.samba.org/sfrench/cifs-2.6: (22 commits)
  cifs: update internal module version number
  cifs: multichannel: try to rebind when reconnecting a channel
  cifs: multichannel: use pointer for binding channel
  smb3: remove static checker warning
  cifs: multichannel: move channel selection above transport layer
  cifs: multichannel: always zero struct cifs_io_parms
  cifs: dump Security Type info in DebugData
  smb3: fix incorrect number of credits when ioctl MaxOutputResponse > 64K
  smb3: default to minimum of two channels when multichannel specified
  cifs: multichannel: move channel selection in function
  cifs: fix minor typos in comments and log messages
  smb3: minor update to compression header definitions
  cifs: minor fix to two debug messages
  cifs: Standardize logging output
  smb3: Add new parm "nodelete"
  cifs: move some variables off the stack in smb2_ioctl_query_info
  cifs: reduce stack use in smb2_compound_op
  cifs: get rid of unused parameter in reconn_setup_dfs_targets()
  cifs: handle hostnames that resolve to same ip in failover
  cifs: set up next DFS target before generic_ip_connect()
  ...
parents 9daa0a27 331cc667
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -221,6 +221,8 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
	struct cifs_ses *ses;
	struct cifs_tcon *tcon;
	int i, j;
	const char *security_types[] = {"Unspecified", "LANMAN", "NTLM",
                                       "NTLMv2", "RawNTLMSSP", "Kerberos"};

	seq_puts(m,
		    "Display Internal CIFS Data Structures for Debugging\n"
@@ -375,6 +377,10 @@ skip_rdma:
				ses->ses_count, ses->serverOS, ses->serverNOS,
				ses->capabilities, ses->status);
			}

			seq_printf(m,"Security type: %s\n",
                                      security_types[server->ops->select_sectype(server, ses->sectype)]);

			if (server->rdma)
				seq_printf(m, "RDMA\n\t");
			seq_printf(m, "TCP status: %d Instance: %d\n\tLocal Users To "
+69 −76
Original line number Diff line number Diff line
@@ -8,6 +8,12 @@
#ifndef _H_CIFS_DEBUG
#define _H_CIFS_DEBUG

#ifdef pr_fmt
#undef pr_fmt
#endif

#define pr_fmt(fmt) "CIFS: " fmt

void cifs_dump_mem(char *label, void *data, int length);
void cifs_dump_detail(void *buf, struct TCP_Server_Info *ptcp_info);
void cifs_dump_mids(struct TCP_Server_Info *);
@@ -47,24 +53,19 @@ extern int cifsFYI;

/* Information level messages, minor events */
#define cifs_info_func(ratefunc, fmt, ...)				\
do {								\
	pr_info_ ## ratefunc("CIFS: " fmt, ##__VA_ARGS__); 	\
} while (0)
	pr_info_ ## ratefunc(fmt, ##__VA_ARGS__)

#define cifs_info(fmt, ...)						\
do { 								\
	cifs_info_func(ratelimited, fmt, ##__VA_ARGS__); 	\
} while (0)
	cifs_info_func(ratelimited, fmt, ##__VA_ARGS__)

/* information message: e.g., configuration, major event */
#define cifs_dbg_func(ratefunc, type, fmt, ...)				\
do {									\
	if ((type) & FYI && cifsFYI & CIFS_INFO) {			\
		pr_debug_ ## ratefunc("%s: "			\
				fmt, __FILE__, ##__VA_ARGS__);	\
		pr_debug_ ## ratefunc("%s: " fmt,			\
				      __FILE__, ##__VA_ARGS__);		\
	} else if ((type) & VFS) {					\
		pr_err_ ## ratefunc("CIFS VFS: "		\
				 fmt, ##__VA_ARGS__);		\
		pr_err_ ## ratefunc("VFS: " fmt, ##__VA_ARGS__);	\
	} else if ((type) & NOISY && (NOISY != 0)) {			\
		pr_debug_ ## ratefunc(fmt, ##__VA_ARGS__);		\
	}								\
@@ -73,11 +74,9 @@ do { \
#define cifs_dbg(type, fmt, ...)					\
do {									\
	if ((type) & ONCE)						\
		cifs_dbg_func(once,			\
			 type, fmt, ##__VA_ARGS__);	\
		cifs_dbg_func(once, type, fmt, ##__VA_ARGS__);		\
	else								\
		cifs_dbg_func(ratelimited,		\
			type, fmt, ##__VA_ARGS__);	\
		cifs_dbg_func(ratelimited, type, fmt, ##__VA_ARGS__);	\
} while (0)

#define cifs_server_dbg_func(ratefunc, type, fmt, ...)			\
@@ -89,7 +88,7 @@ do { \
		pr_debug_ ## ratefunc("%s: \\\\%s " fmt,		\
				      __FILE__, sn, ##__VA_ARGS__);	\
	} else if ((type) & VFS) {					\
		pr_err_ ## ratefunc("CIFS VFS: \\\\%s " fmt,	\
		pr_err_ ## ratefunc("VFS: \\\\%s " fmt,			\
				    sn, ##__VA_ARGS__);			\
	} else if ((type) & NOISY && (NOISY != 0)) {			\
		pr_debug_ ## ratefunc("\\\\%s " fmt,			\
@@ -100,11 +99,10 @@ do { \
#define cifs_server_dbg(type, fmt, ...)					\
do {									\
	if ((type) & ONCE)						\
		cifs_server_dbg_func(once,		\
			type, fmt, ##__VA_ARGS__);	\
		cifs_server_dbg_func(once, type, fmt, ##__VA_ARGS__);	\
	else								\
		cifs_server_dbg_func(ratelimited,	\
			type, fmt, ##__VA_ARGS__);	\
		cifs_server_dbg_func(ratelimited, type, fmt,		\
				     ##__VA_ARGS__);			\
} while (0)

#define cifs_tcon_dbg_func(ratefunc, type, fmt, ...)			\
@@ -116,22 +114,19 @@ do { \
		pr_debug_ ## ratefunc("%s: %s "	fmt,			\
				      __FILE__, tn, ##__VA_ARGS__);	\
	} else if ((type) & VFS) {					\
		pr_err_ ## ratefunc("CIFS VFS: %s " fmt,	\
			tn, ##__VA_ARGS__);			\
		pr_err_ ## ratefunc("VFS: %s " fmt, tn, ##__VA_ARGS__);	\
	} else if ((type) & NOISY && (NOISY != 0)) {			\
		pr_debug_ ## ratefunc("%s " fmt,		\
			tn, ##__VA_ARGS__);			\
		pr_debug_ ## ratefunc("%s " fmt, tn, ##__VA_ARGS__);	\
	}								\
} while (0)

#define cifs_tcon_dbg(type, fmt, ...)					\
do {									\
	if ((type) & ONCE)						\
		cifs_tcon_dbg_func(once,		\
			type, fmt, ##__VA_ARGS__);	\
		cifs_tcon_dbg_func(once, type, fmt, ##__VA_ARGS__);	\
	else								\
		cifs_tcon_dbg_func(ratelimited,	\
			type, fmt, ##__VA_ARGS__);	\
		cifs_tcon_dbg_func(ratelimited, type, fmt,		\
				   ##__VA_ARGS__);			\
} while (0)

/*
@@ -159,9 +154,7 @@ do { \
} while (0)

#define cifs_info(fmt, ...)						\
do {									\
	pr_info("CIFS: "fmt, ##__VA_ARGS__);				\
} while (0)
	pr_info(fmt, ##__VA_ARGS__)
#endif

#endif				/* _H_CIFS_DEBUG */
+4 −4
Original line number Diff line number Diff line
@@ -520,7 +520,7 @@ static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,

	rc = crypto_shash_init(&ses->server->secmech.sdeschmacmd5->shash);
	if (rc) {
		cifs_dbg(VFS, "%s: could not init hmacmd5\n", __func__);
		cifs_dbg(VFS, "%s: Could not init hmacmd5\n", __func__);
		return rc;
	}

@@ -624,7 +624,7 @@ CalcNTLMv2_response(const struct cifs_ses *ses, char *ntlmv2_hash)

	rc = crypto_shash_init(&ses->server->secmech.sdeschmacmd5->shash);
	if (rc) {
		cifs_dbg(VFS, "%s: could not init hmacmd5\n", __func__);
		cifs_dbg(VFS, "%s: Could not init hmacmd5\n", __func__);
		return rc;
	}

@@ -723,7 +723,7 @@ setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp)
	/* calculate ntlmv2_hash */
	rc = calc_ntlmv2_hash(ses, ntlmv2_hash, nls_cp);
	if (rc) {
		cifs_dbg(VFS, "could not get v2 hash rc %d\n", rc);
		cifs_dbg(VFS, "Could not get v2 hash rc %d\n", rc);
		goto unlock;
	}

@@ -783,7 +783,7 @@ calc_seckey(struct cifs_ses *ses)

	ctx_arc4 = kmalloc(sizeof(*ctx_arc4), GFP_KERNEL);
	if (!ctx_arc4) {
		cifs_dbg(VFS, "could not allocate arc4 context\n");
		cifs_dbg(VFS, "Could not allocate arc4 context\n");
		return -ENOMEM;
	}

+2 −0
Original line number Diff line number Diff line
@@ -534,6 +534,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
		seq_puts(s, ",signloosely");
	if (tcon->nocase)
		seq_puts(s, ",nocase");
	if (tcon->nodelete)
		seq_puts(s, ",nodelete");
	if (tcon->local_lease)
		seq_puts(s, ",locallease");
	if (tcon->retry)
+1 −1
Original line number Diff line number Diff line
@@ -156,5 +156,5 @@ extern int cifs_truncate_page(struct address_space *mapping, loff_t from);
extern const struct export_operations cifs_export_ops;
#endif /* CONFIG_CIFS_NFSD_EXPORT */

#define CIFS_VERSION   "2.26"
#define CIFS_VERSION   "2.27"
#endif				/* _CIFSFS_H */
Loading