Enable F2FS compression (`CONFIG_F2FS_FS_COMPRESSION`) in the WSL kernel

Open Beginner friendly
#42,114 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
linux

Research direction

Start by reading the F2FS settings in config-wsl and config-wsl-arm64. Enable the compression and codec options listed in the issue in both files, then check that the resulting kernel configuration accepts them. Done means both WSL kernel configurations enable F2FS compression and the requested codecs.

Written by the indexing model from the issue text.

Description

feature

Is your feature request related to a problem? Please describe.

Since 6.18, the WSL kernel builds with CONFIG_F2FS_FS=m, but leaves CONFIG_F2FS_FS_COMPRESSION unset:

CONFIG_F2FS_FS=m
CONFIG_F2FS_STAT_FS=y
CONFIG_F2FS_FS_XATTR=y
CONFIG_F2FS_FS_POSIX_ACL=y
# CONFIG_F2FS_FS_SECURITY is not set
# CONFIG_F2FS_CHECK_FS is not set
# CONFIG_F2FS_FAULT_INJECTION is not set
# CONFIG_F2FS_FS_COMPRESSION is not set
CONFIG_F2FS_IOSTAT=y

As a result, F2FS volumes created with the compression feature mount without error, but their compressed files cannot be read. Opening a compressed file fails with EOPNOTSUPP, and the compress_algorithm mount option is ignored.

This makes it impossible to test custom OS images whose F2FS volumes use compression.


Describe the solution you'd like

Enable CONFIG_F2FS_FS_COMPRESSION in config-wsl and config-wsl-arm64:

CONFIG_F2FS_FS_COMPRESSION=y
CONFIG_F2FS_FS_LZO=y
CONFIG_F2FS_FS_LZORLE=y
CONFIG_F2FS_FS_LZ4=y
CONFIG_F2FS_FS_LZ4HC=y
CONFIG_F2FS_FS_ZSTD=y

Major distributions (e.g., Arch, Debian, Fedora, Ubuntu) already ship with F2FS compression enabled.


Describe alternatives you've considered

Building a custom kernel and pointing .wslconfig at it works but requires a manual rebuild for every WSL kernel release.

Dominant language
C++
Stars
34.4k
Forks
1.9k
Avg merge
1d 23h
Merged PRs (30d)
166

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/WSL

All issues in microsoft/WSL

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.