From: Namjae Jeon <linkinjeon@kernel.org>
To: linux-cifs@vger.kernel.org
Cc: smfrench@gmail.com, senozhatsky@chromium.org, tom@talpey.com,
metze@samba.org, atteh.mailbox@gmail.com,
Namjae Jeon <linkinjeon@kernel.org>
Subject: [PATCH 0/5] smb: add SMB2 compression support for ksmbd
Date: Thu, 11 Jun 2026 00:15:38 +0900 [thread overview]
Message-ID: <20260610151543.25218-1-linkinjeon@kernel.org> (raw)
This series adds SMB 3.1.1 compression support to ksmbd and moves the
existing client LZ77 encoder into fs/smb/common so both cifs and ksmbd
can use the same codec.
cifs.ko advertises and decodes chained compression capabilities,
including LZ77 and Pattern_V1, but this series does not set
SMB2_READFLAG_REQUEST_COMPRESSED or add a compressed transform receive
path. Receiving compressed SMB2 transforms remains a TODO for CIFS
client developers.
ksmbd negotiates LZ77 and optional chained Pattern_V1 support, advertises
SMB2_SHAREFLAG_COMPRESS_DATA, decodes compressed client requests, and
compresses eligible READ responses when doing so reduces the wire size.
Namjae Jeon (5):
smb: move LZ77 compression into common code
smb: add common SMB2 compression transform helpers
cifs: negotiate chained SMB2 compression capabilities
ksmbd: negotiate and decode SMB2 compression
ksmbd: compress SMB2 READ responses
fs/smb/client/Makefile | 2 +-
fs/smb/client/cifsglob.h | 2 +
fs/smb/client/compress.c | 12 +-
fs/smb/client/compress.h | 28 +-
fs/smb/client/smb2pdu.c | 44 ++-
fs/smb/common/Makefile | 3 +
fs/smb/common/compress/compress.c | 399 ++++++++++++++++++++++
fs/smb/common/compress/compress.h | 28 ++
fs/smb/{client => common}/compress/lz77.c | 136 +++++++-
fs/smb/{client => common}/compress/lz77.h | 17 +-
fs/smb/common/smb2pdu.h | 11 +-
fs/smb/server/Makefile | 2 +-
fs/smb/server/compress.c | 209 ++++++++++++
fs/smb/server/compress.h | 16 +
fs/smb/server/connection.c | 12 +
fs/smb/server/connection.h | 3 +
fs/smb/server/ksmbd_work.c | 1 +
fs/smb/server/ksmbd_work.h | 4 +
fs/smb/server/server.c | 10 +
fs/smb/server/smb2pdu.c | 118 ++++++-
fs/smb/server/smb_common.c | 5 -
21 files changed, 989 insertions(+), 73 deletions(-)
create mode 100644 fs/smb/common/compress/compress.c
create mode 100644 fs/smb/common/compress/compress.h
rename fs/smb/{client => common}/compress/lz77.c (75%)
rename fs/smb/{client => common}/compress/lz77.h (65%)
create mode 100644 fs/smb/server/compress.c
create mode 100644 fs/smb/server/compress.h
--
2.25.1
next reply other threads:[~2026-06-10 15:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 15:15 Namjae Jeon [this message]
2026-06-10 15:15 ` [PATCH 1/5] smb: move LZ77 compression into common code Namjae Jeon
2026-06-10 15:15 ` [PATCH 2/5] smb: add common SMB2 compression transform helpers Namjae Jeon
2026-06-10 15:15 ` [PATCH 3/5] cifs: negotiate chained SMB2 compression capabilities Namjae Jeon
2026-06-10 15:15 ` [PATCH 4/5] ksmbd: negotiate and decode SMB2 compression Namjae Jeon
2026-06-10 15:15 ` [PATCH 5/5] ksmbd: compress SMB2 READ responses Namjae Jeon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260610151543.25218-1-linkinjeon@kernel.org \
--to=linkinjeon@kernel.org \
--cc=atteh.mailbox@gmail.com \
--cc=linux-cifs@vger.kernel.org \
--cc=metze@samba.org \
--cc=senozhatsky@chromium.org \
--cc=smfrench@gmail.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox