Skip to content

Commit

Permalink
Merge tag 'v6.12-rc-smb3-client-fixes-part1' of git://git.samba.org/s…
Browse files Browse the repository at this point in the history
…french/cifs-2.6

Pull smb client updates from Steve French:

 - cleanups (moving duplicated code, removing unused code etc)

 - fixes relating to "sfu" mount options (for better handling special
   file types)

 - SMB3.1.1 compression fixes/improvements

* tag 'v6.12-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6: (24 commits)
  smb: client: fix compression heuristic functions
  cifs: Update SFU comments about fifos and sockets
  cifs: Add support for creating SFU symlinks
  smb: use LIST_HEAD() to simplify code
  cifs: Recognize SFU socket type
  cifs: Show debug message when SFU Fifo type was detected
  cifs: Put explicit zero byte into SFU block/char types
  cifs: Add support for reading SFU symlink location
  cifs: Fix recognizing SFU symlinks
  smb: client: compress: fix an "illegal accesses" issue
  smb: client: compress: fix a potential issue of freeing an invalid pointer
  smb: client: compress: LZ77 code improvements cleanup
  smb: client: insert compression check/call on write requests
  smb3: mark compression as CONFIG_EXPERIMENTAL and fix missing compression operation
  cifs: Remove obsoleted declaration for cifs_dir_open
  smb: client: Use min() macro
  cifs: convert to use ERR_CAST()
  smb: add comment to STATUS_MCA_OCCURED
  smb: move SMB2 Status code to common header file
  smb: move some duplicate definitions to common/smbacl.h
  ...
  • Loading branch information
Linus Torvalds committed Sep 19, 2024
2 parents 39898f0 + 5ac1f99 commit 4e0373f
Show file tree
Hide file tree
Showing 43 changed files with 1,206 additions and 2,265 deletions.
14 changes: 14 additions & 0 deletions fs/smb/client/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,18 @@ config CIFS_ROOT

Most people say N here.

config CIFS_COMPRESSION
bool "SMB message compression (Experimental)"
depends on CIFS
default n
help
Enables over-the-wire message compression for SMB 3.1.1
mounts when negotiated with the server.

Only write requests with data size >= PAGE_SIZE will be
compressed to avoid wasting resources.

Say Y here if you want SMB traffic to be compressed.
If unsure, say N.

endif
2 changes: 2 additions & 0 deletions fs/smb/client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ cifs-$(CONFIG_CIFS_SMB_DIRECT) += smbdirect.o
cifs-$(CONFIG_CIFS_ROOT) += cifsroot.o

cifs-$(CONFIG_CIFS_ALLOW_INSECURE_LEGACY) += smb1ops.o cifssmb.o

cifs-$(CONFIG_CIFS_COMPRESSION) += compress.o compress/lz77.o
7 changes: 6 additions & 1 deletion fs/smb/client/cifs_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
seq_printf(m, ",ACL");
#ifdef CONFIG_CIFS_SWN_UPCALL
seq_puts(m, ",WITNESS");
#endif
#ifdef CONFIG_CIFS_COMPRESSION
seq_puts(m, ",COMPRESSION");
#endif
seq_putc(m, '\n');
seq_printf(m, "CIFSMaxBufSize: %d\n", CIFSMaxBufSize);
Expand Down Expand Up @@ -475,7 +478,9 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
}

seq_puts(m, "\nCompression: ");
if (!server->compression.requested)
if (!IS_ENABLED(CONFIG_CIFS_COMPRESSION))
seq_puts(m, "no built-in support");
else 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));
Expand Down
Loading

0 comments on commit 4e0373f

Please sign in to comment.