Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: enable the CONFIG_F2FS_FS_COMPRESSION option #3689

Merged
merged 2 commits into from
Apr 19, 2022

Conversation

josacar
Copy link
Collaborator

@josacar josacar commented Apr 16, 2022

This allows to use compression on a F2FS partition to save space and
reduce I/O operations to media.

Description

This allows to use compress options when mounting a F2FS filesystem created before with compress option:

mkfs.f2fs -l mylabel -O extra_attr,inode_checksum,sb_checksum,compression /dev/sdxY

The image builder does not support creating a f2fs filesystem with compress option yet, I've the changes pending in another commit.

How Has This Been Tested?

I've compiled this option when building a custom image:

root@rock-3a:~# cat /etc/armbian-release
# PLEASE DO NOT EDIT THIS FILE
BOARD=rock-3a
BOARD_NAME="Rock 3A"
BOARDFAMILY=rk35xx
BUILD_REPOSITORY_URL=https://github.com/armbian/build
BUILD_REPOSITORY_COMMIT=92a1c729d-dirty
VERSION=22.02.1
LINUXFAMILY=rockchip64
ARCH=arm64
IMAGE_TYPE=stable
BOARD_TYPE=wip
INITRD_ARCH=arm64
KERNEL_IMAGE_TYPE=Image
BRANCH=edge

root@rock-3a:~# mount | grep f2fs
/dev/mmcblk0p2 on / type f2fs (rw,noatime,lazytime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=default,checkpoint_merge,fsync_mode=posix,compress_algorithm=zstd,compress_log_size=2,compress_mode=fs,discard_unit=block)

root@rock-3a:~# grep CONFIG_F2FS_FS_COMPRESSION /boot/config-5.17.3-rk35xx
CONFIG_F2FS_FS_COMPRESSION=y

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

This allows to use compression on a F2FS partition to save space and
reduce I/O operations to media.
Copy link
Member

@lanefu lanefu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this isn't a device specific setting would prefer that this is enabled on all kernel configs where compatible

@josacar
Copy link
Collaborator Author

josacar commented Apr 16, 2022

@lanefu sounds great, I'll add new commits then. Thanks!

@josacar josacar changed the title rk35xx: enable the CONFIG_F2FS_FS_COMPRESSION option all: enable the CONFIG_F2FS_FS_COMPRESSION option Apr 17, 2022
@josacar
Copy link
Collaborator Author

josacar commented Apr 17, 2022

@lanefu I've updated the architectures that have CONFIG_F2FS_FS set already.

@igorpecovnik igorpecovnik merged commit 08cf31d into armbian:master Apr 19, 2022
littlecxm pushed a commit to littlecxm/armbian-build that referenced this pull request May 7, 2022
* rk35xx: enable the CONFIG_F2FS_FS_COMPRESSION option

This allows to use compression on a F2FS partition to save space and
reduce I/O operations to media.

* all: enable the CONFIG_F2FS_FS_COMPRESSION option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants