1 1
kimidare

Question about the default ext4 settings in lib/debootstrap.sh

Recommended Posts

Hey guys.

 

 

1. This piece

    if [[ $(lsb_release -sc) =~ bionic|buster|cosmic|disco ]]; then
        mkopts[ext4]='-q -m 2 -O ^64bit,^metadata_csum'
    elif [[ $(lsb_release -sc) == xenial ]]; then
        mkopts[ext4]='-q -m 2'
    fi

Why disable metadata_csum?

Why disable 64bit overall, not just for pure 32 bit boards?

 

Edit on Mar 9 2020

Metadata checksums is a new feature of ext4 since e2fsprogs 1.44 (xenial has 1.42). It makes the fs more robust to data corruption but it requires some extra cpu power to calculate the checksums. It is not a problem for generic cpus with SSE4.2 (= hardware accelerated crc32):  intel since core gen1, amd since bulldozer.

Arm world is not that simple. So we just disable the checksums in distros which have them on by default in /etc/mke2fs.conf to reduce cpu usage.

The 64bit option is only required for the checksums (since armbian is not something for use with really huge storages) hence we disable it as well.

 

 

2. This piece 

[[ $ROOTFS_TYPE == ext4 ]] && tune2fs -o journal_data_writeback $rootdevice > /dev/null

Why enable journal_data_writeback feature? What are the pros and cons?

 

Edit on Mar 9 2020

"Data mode" section in https://www.kernel.org/doc/Documentation/filesystems/ext4.txt

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
1 1