Skip to content

Commit 4e0373f

Browse files
committed
Merge tag 'v6.12-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/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 ...
2 parents 39898f0 + 5ac1f99 commit 4e0373f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1206
-2265
lines changed

fs/smb/client/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,4 +204,18 @@ config CIFS_ROOT
204204

205205
Most people say N here.
206206

207+
config CIFS_COMPRESSION
208+
bool "SMB message compression (Experimental)"
209+
depends on CIFS
210+
default n
211+
help
212+
Enables over-the-wire message compression for SMB 3.1.1
213+
mounts when negotiated with the server.
214+
215+
Only write requests with data size >= PAGE_SIZE will be
216+
compressed to avoid wasting resources.
217+
218+
Say Y here if you want SMB traffic to be compressed.
219+
If unsure, say N.
220+
207221
endif

fs/smb/client/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ cifs-$(CONFIG_CIFS_SMB_DIRECT) += smbdirect.o
3333
cifs-$(CONFIG_CIFS_ROOT) += cifsroot.o
3434

3535
cifs-$(CONFIG_CIFS_ALLOW_INSECURE_LEGACY) += smb1ops.o cifssmb.o
36+
37+
cifs-$(CONFIG_CIFS_COMPRESSION) += compress.o compress/lz77.o

fs/smb/client/cifs_debug.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,9 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
349349
seq_printf(m, ",ACL");
350350
#ifdef CONFIG_CIFS_SWN_UPCALL
351351
seq_puts(m, ",WITNESS");
352+
#endif
353+
#ifdef CONFIG_CIFS_COMPRESSION
354+
seq_puts(m, ",COMPRESSION");
352355
#endif
353356
seq_putc(m, '\n');
354357
seq_printf(m, "CIFSMaxBufSize: %d\n", CIFSMaxBufSize);
@@ -475,7 +478,9 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
475478
}
476479

477480
seq_puts(m, "\nCompression: ");
478-
if (!server->compression.requested)
481+
if (!IS_ENABLED(CONFIG_CIFS_COMPRESSION))
482+
seq_puts(m, "no built-in support");
483+
else if (!server->compression.requested)
479484
seq_puts(m, "disabled on mount");
480485
else if (server->compression.enabled)
481486
seq_printf(m, "enabled (%s)", compression_alg_str(server->compression.alg));

0 commit comments

Comments
 (0)