SIGN IN SIGN UP

Merge tag 'ntfs-for-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs

Pull ntfs updates from Namjae Jeon:
 "This contains improvements to compression support, metadata handling,
  error propagation, and filesystem robustness.

  New feature:

   - Add optional read support for Windows System Compression (WOF)

     Add CONFIG_NTFS_FS_WOF_COMPRESSION and support reading
     WOF-compressed files through the NTFS page-read path. This includes
     parsing REPARSE_TAG_WOF, handling resident and non-resident WOF
     metadata and compressed chunks, and adding kernel-side XPRESS
     4K/8K/16K and LZX 32K decompressors. The codecs use a common
     transparent compression interface shared with LZNT1.

     WOF support is read-only and disabled unless explicitly enabled.

  Other changes:

   - Harden malformed filesystem handling and error paths.

     Add bounds and consistency checks for mapping pairs, run lengths,
     MFT locations, update-sequence offsets, non-resident attributes,
     compressed attributes, index roots, and bitmap scans. Prevent
     out-of-bounds accesses in decompression, MFT allocation, and index
     conversion paths, clean up MFT mappings and attribute search
     contexts on failure, and propagate attribute and inode
     initialization errors correctly.

   - Improve compressed-file I/O path.

     Fix compressed writes on large-page and highmem systems, reuse
     compression contexts and output workspaces, avoid unnecessary reads
     for full-unit overwrites, and submit one bio per compressed write
     unit. Write replacement data before publishing the new mapping,
     correctly handle zero-filled compressed blocks, and fix
     initialized-size and folio state updates after compressed writes.

   - Synchronize resident reads with MFT record updates.

   - Validate the final EA stream size before modifying existing data,
     rewrite the stream safely when replacing entries, restore the
     previous state when metadata updates fail, and remove the EA
     attribute pair when the last entry is deleted.

   - Apply Windows filename restrictions only when windows_names is
     enabled.

   - Allow index roots to relocate to extent MFT records when the base
     record lacks sufficient space.

   - Move non-resident attribute payload data before shrinking its
     record.

   - Correct resident-to-non-resident conversion when compression or
     sparse flags are enabled.

   - Prepare file allocation and initialized-size updates before
     buffered or direct I/O submission, and use
     pagecache_isize_extended() when extending the file size.

   - Fix highmem and page/folio access in compressed I/O paths by using
     the correct local mappings and page helpers.

   - Apply per-file $LXMOD permissions instead of mount masks when
     available, and prevent unprivileged writes to reserved $LX*
     attributes

   - Update the NTFS maintainer mailing list

   - Small cleanups"

* tag 'ntfs-for-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs: (52 commits)
  ntfs: support resident WOF decompression
  ntfs: add non-resident WOF decompression
  ntfs: implement codec ops for LZX and XPRESS
  ntfs: port lzx/xpress decompressors from ntfs-3g-system-compression
  ntfs: return errors from inode initialization
  ntfs: parse REPARSE_TAG_WOF
  ntfs: return errors from ntfs_attr_readall
  ntfs: add WOF compression config option
  ntfs: define LZNT1 codec ops under transparent codec interface
  ntfs: introduce transparent compression codec interface
  ntfs: reject invalid empty mapping pairs
  ntfs: fix resource leak in ntfs_new_attr_flags
  ntfs: validate usa_ofs before preserving the update sequence number
  ntfs: fix off-by-one page overflow in ntfs_decompress()
  ntfs: do not update ctime when setxattr fails
  ntfs: reject invalid MFT LCNs from boot sector
  ntfs: serialize resident iomap reads with mrec_lock
  ntfs: verify run length exceeding volume boundary
  ntfs: allow index root relocation
  ntfs: validate non-resident attribute offsets
  ...
L
Linus Torvalds committed
7f22f3a1939e56669b1e5dc9a873ce303f93a1c0