[PATCH v3 0/9] ntfs: add Windows system compression support

Hyunchul Lee <[email protected]>
Newsgroups dev.linux.lists.ntfs
Message-ID <[email protected]>
This series adds Windows system compression support to the NTFS driver.

Windows system compression more aggressively compresses system files,
such as binaries and DLLs, using XPRESS or LZX.  It is intended for
files that are rarely modified.

The series adds a CONFIG_NTFS_FS_WOF_COMPRESSION option, parses WOF
reparse points, and adds XPRESS and LZX codec support. It handles both
resident and non-resident WOF metadata and compressed data.

The first two patches introduce the generic compression codec interface
and bind the existing LZNT1 implementation.  The remaining patches add
the configuration option, WOF parsing, decompression libraries, codec
operations, and WOF decompression support.

Changes in v3:
  * Patch 4: Added to make ntfs_attr_readall() return errors, including
    -ENOMEM, so transient read failures are not reported as filesystem
    corruption.
  * Patch 8: derive WOF chunk table entry width from the base file size
    and fold this fix into the non-resident WOF decompression patch.
Changes in v2:
  * Patch 3: fix the missing space in the WOF Kconfig help text.
  * Patch 4: validate WOF reparse data and retain WOF state without a
    decoder, returning -EOPNOTSUPP for unsupported providers or formats.
  * Patch 7: reject WOF direct I/O and data-changing paths, report WOF
    files as compressed without DIO alignment, serialize runlist access,
    and avoid sibling-page lock cycles with private-buffer/direct-folio
    fallback.
  * Patch 8: derive offset width from the base file size, handle
    one-chunk streams, validate chunk sizes while parsing, and use the
    base inode's MFT-record lock for resident metadata lookups.

---
Hyunchul Lee (9):
      ntfs: introduce transparent compression codec interface
      ntfs: define LZNT1 codec ops under transparent codec interface
      ntfs: add WOF compression config option
      ntfs: return errors from ntfs_attr_readall
      ntfs: parse REPARSE_TAG_WOF
      ntfs: port lzx/xpress decompressors from ntfs-3g-system-compression
      ntfs: implement codec ops for LZX and XPRESS
      ntfs: add non-resident WOF decompression
      ntfs: support resident WOF decompression

 fs/ntfs/Kconfig                 |  11 +
 fs/ntfs/Makefile                |   3 +
 fs/ntfs/aops.c                  |  19 +-
 fs/ntfs/attrib.c                |  10 +-
 fs/ntfs/bdev-io.c               |   4 +-
 fs/ntfs/compress.c              |  12 +-
 fs/ntfs/ea.c                    |  66 +++-
 fs/ntfs/file.c                  |  47 ++-
 fs/ntfs/index.c                 |   4 +-
 fs/ntfs/inode.c                 |  16 +-
 fs/ntfs/inode.h                 |   2 +
 fs/ntfs/lib/decompress_common.c | 200 +++++++++++
 fs/ntfs/lib/decompress_common.h | 444 +++++++++++++++++++++++++
 fs/ntfs/lib/lib.h               |  29 ++
 fs/ntfs/lib/lzx_decompress.c    | 631 +++++++++++++++++++++++++++++++++++
 fs/ntfs/lib/xpress_decompress.c | 154 +++++++++
 fs/ntfs/ntfs.h                  |   4 +
 fs/ntfs/ntfs_codec.h            |  54 +++
 fs/ntfs/reparse.c               |  98 +++++-
 fs/ntfs/reparse.h               |   2 +-
 fs/ntfs/super.c                 |   3 +
 fs/ntfs/wof.c                   | 720 ++++++++++++++++++++++++++++++++++++++++
 22 files changed, 2486 insertions(+), 47 deletions(-)
---
base-commit: df7dce2090342170b7643d36f694204cae7792a9
change-id: 20260818-topic-wof-v2-53051d7f0848

Best regards,
-- 
Thanks,
Hyunchul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.