[PATCH][SMB3] mark compression as CONFIG_EXPERIMENTAL and fix missing compression operation
Steve French
smfrench at gmail.com
Sun Jul 28 00:39:28 UTC 2024
Had to add one line due to an error in some configurations pointed out
by the kernel test robot:
index 0cc9c6abf840..3d0d3eaa8ffb 100644
--- a/fs/smb/client/compress/lz77.h
+++ b/fs/smb/client/compress/lz77.h
@@ -9,6 +9,7 @@
#ifndef _SMB_COMPRESS_LZ77_H
#define _SMB_COMPRESS_LZ77_H
+#include <linux/uaccess.h>
#ifdef CONFIG_CIFS_COMPRESSION
#include <asm/ptrace.h>
#include <linux/kernel.h>
to address:
In file included from fs/smb/client/compress/lz77.c:10:
>> fs/smb/client/compress/lz77.h:127:9: error: call to undeclared function 'copy_from_kernel_nofault'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
127 | return copy_from_kernel_nofault(dst, src, count);
| ^
1 error generated.
vim +/copy_from_kernel_nofault +127 fs/smb/client/compress/lz77.h
124
125 static __always_inline long lz77_copy(u8 *dst, const u8 *src,
size_t count)
126 {
> 127 return copy_from_kernel_nofault(dst, src, count);
128 }
129 #else /* CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS */
130 static __always_inline u8 lz77_read8(const void *ptr)
131 {
132 return get_unaligned((u8 *)ptr);
133 }
134
On Fri, Jul 26, 2024 at 6:53 PM Steve French <smfrench at gmail.com> wrote:
>
> Since some of Enzo's compression patch series has to be changed due to David Howell's netfs changes to cifs.ko over the past two releases, I split out the obvious parts of his patch to implement the client side of SMB3.1.1 compression on write requests (see https://git.exis.tech/linux.git/patch/?id=40414c6a34081b372e45c7ce5060a6d34779f6ba for the original patch of Enzo's) but left out the final piece of the patch (the calls from the write path).
>
> This moves SMB3.1.1 compression code into experimental config option,
> and fixes the compress mount option to require that config option.
> Also implements unchained LZ77 "plain" compression algorithm as per
> MS-XCA specification section "2.3 Plain LZ77 Compression Algorithm Details".
>
> See attached
>
> --
> Thanks,
>
> Steve
--
Thanks,
Steve
More information about the samba-technical
mailing list