Commit 279d44ce authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag '6.9-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client updates from Steve French:

 - fix for folios/netfs data corruption in cifs_extend_writeback

 - additional tracepoint added

 - updates for special files and symlinks: improvements to allow
   selecting use of either WSL or NFS reparse point format on creating
   special files

 - allocation size improvement for cached files

 - minor cleanup patches

 - fix to allow changing the password on remount when password for the
   session is expired.

 - lease key related fixes: caching hardlinked files, deletes of
   deferred close files, and an important fix to better reuse lease keys
   for compound operations, which also can avoid lease break timeouts
   when low on credits

 - fix potential data corruption with write/readdir races

 - compression cleanups and a fix for compression headers

* tag '6.9-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6: (24 commits)
  cifs: update internal module version number for cifs.ko
  smb: common: simplify compression headers
  smb: common: fix fields sizes in compression_pattern_payload_v1
  smb: client: negotiate compression algorithms
  smb3: add dynamic trace point for ioctls
  cifs: Fix writeback data corruption
  smb: client: return reparse type in /proc/mounts
  smb: client: set correct d_type for reparse DFS/DFSR and mount point
  smb: client: parse uid, gid, mode and dev from WSL reparse points
  smb: client: introduce SMB2_OP_QUERY_WSL_EA
  smb: client: Fix a NULL vs IS_ERR() check in wsl_set_xattrs()
  smb: client: add support for WSL reparse points
  smb: client: reduce number of parameters in smb2_compound_op()
  smb: client: fix potential broken compound request
  smb: client: move most of reparse point handling code to common file
  smb: client: introduce reparse mount option
  smb: client: retry compound request without reusing lease
  smb: client: do not defer close open handles to deleted files
  smb: client: reuse file lease key in compound operations
  smb3: update allocation size more accurately on write completion
  ...
parents 9d9539db 3681fe1b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5255,6 +5255,7 @@ R: Paulo Alcantara <pc@manguebit.com> (DFS, global name space)
R:	Ronnie Sahlberg <ronniesahlberg@gmail.com> (directory leases, sparse files)
R:	Shyam Prasad N <sprasad@microsoft.com> (multichannel)
R:	Tom Talpey <tom@talpey.com> (RDMA, smbdirect)
R:	Bharath SM <bharathsm@microsoft.com> (deferred close, directory leases)
L:	linux-cifs@vger.kernel.org
L:	samba-technical@lists.samba.org (moderated for non-subscribers)
S:	Supported
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ cifs-y := trace.o cifsfs.o cifs_debug.o connect.o dir.o file.o \
	  smb2ops.o smb2maperror.o smb2transport.o \
	  smb2misc.o smb2pdu.o smb2inode.o smb2file.o cifsacl.o fs_context.o \
	  dns_resolve.o cifs_spnego_negtokeninit.asn1.o asn1.o \
	  namespace.o
	  namespace.o reparse.o

$(obj)/asn1.o: $(obj)/cifs_spnego_negtokeninit.asn1.h

+28 −6
Original line number Diff line number Diff line
@@ -278,6 +278,24 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v)
	return 0;
}

static __always_inline const char *compression_alg_str(__le16 alg)
{
	switch (alg) {
	case SMB3_COMPRESS_NONE:
		return "NONE";
	case SMB3_COMPRESS_LZNT1:
		return "LZNT1";
	case SMB3_COMPRESS_LZ77:
		return "LZ77";
	case SMB3_COMPRESS_LZ77_HUFF:
		return "LZ77-Huffman";
	case SMB3_COMPRESS_PATTERN:
		return "Pattern_V1";
	default:
		return "invalid";
	}
}

static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
{
	struct mid_q_entry *mid_entry;
@@ -423,12 +441,6 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
			server->echo_credits,
			server->oplock_credits,
			server->dialect);
		if (server->compress_algorithm == SMB3_COMPRESS_LZNT1)
			seq_printf(m, " COMPRESS_LZNT1");
		else if (server->compress_algorithm == SMB3_COMPRESS_LZ77)
			seq_printf(m, " COMPRESS_LZ77");
		else if (server->compress_algorithm == SMB3_COMPRESS_LZ77_HUFF)
			seq_printf(m, " COMPRESS_LZ77_HUFF");
		if (server->sign)
			seq_printf(m, " signed");
		if (server->posix_ext_supported)
@@ -460,6 +472,14 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
				   server->leaf_fullpath);
		}

		seq_puts(m, "\nCompression: ");
		if (!server->compression.requested)
			seq_puts(m, "disabled on mount");
		else if (server->compression.enabled)
			seq_printf(m, "enabled (%s)", compression_alg_str(server->compression.alg));
		else
			seq_puts(m, "disabled (not supported by this server)");

		seq_printf(m, "\n\n\tSessions: ");
		i = 0;
		list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) {
@@ -488,6 +508,8 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
				ses->ses_count, ses->serverOS, ses->serverNOS,
				ses->capabilities, ses->ses_status);
			}
			if (ses->expired_pwd)
				seq_puts(m, "password no longer valid ");
			spin_unlock(&ses->ses_lock);

			seq_printf(m, "\n\tSecurity type: %s ",
+2 −0
Original line number Diff line number Diff line
@@ -673,6 +673,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
		seq_printf(s, ",backupgid=%u",
			   from_kgid_munged(&init_user_ns,
					    cifs_sb->ctx->backupgid));
	seq_show_option(s, "reparse",
			cifs_reparse_type_str(cifs_sb->ctx->reparse_type));

	seq_printf(s, ",rsize=%u", cifs_sb->ctx->rsize);
	seq_printf(s, ",wsize=%u", cifs_sb->ctx->wsize);
+2 −2
Original line number Diff line number Diff line
@@ -152,6 +152,6 @@ extern const struct export_operations cifs_export_ops;
#endif /* CONFIG_CIFS_NFSD_EXPORT */

/* when changing internal version - update following two lines at same time */
#define SMB3_PRODUCT_BUILD 47
#define CIFS_VERSION   "2.47"
#define SMB3_PRODUCT_BUILD 48
#define CIFS_VERSION   "2.48"
#endif				/* _CIFSFS_H */
Loading