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

Switch default ext4 inode size to 256 bytes #939

Merged
merged 2 commits into from
Jun 22, 2023
Merged

Switch default ext4 inode size to 256 bytes #939

merged 2 commits into from
Jun 22, 2023

Conversation

jepio
Copy link
Member

@jepio jepio commented Jun 21, 2023

Switch default ext4 inode size to 256 bytes

Inode sizes smaller than 256:

  • don't support extended metadata (nanosecond timestamp resolution)
  • cannot handle dates beyond 2038
  • are deprecated

Change the default from 128 to 256. There is no way to apply this change on a mounted filesystem so this change will only apply to new deployments.

Fixes: flatcar/Flatcar#1082

How to use

./build_image
<run flatcar>
tune2fs -l /dev/vda9

Testing done

No testing done.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

Inode sizes smaller than 256:
- don't support extended metadata (nanosecond timestamp resolution)
- cannot handle dates beyond 2038
- are deprecated

Change the default from 128 to 256. There is no way to apply this change on a
mounted filesystem so this change will only apply to new deployments.

Fixes: flatcar/Flatcar#1082
Signed-off-by: Jeremi Piotrowski <[email protected]>
@jepio jepio temporarily deployed to development June 21, 2023 11:35 — with GitHub Actions Inactive
@@ -403,7 +403,7 @@ def FormatExt(part, device):
'-t', part['fs_type'],
'-b', part['fs_block_size'],
'-i', part.get('fs_bytes_per_inode', part['fs_block_size']),
'-I', part.get('fs_inode_size', 128),
'-I', part.get('fs_inode_size', 256),
Copy link
Contributor

Choose a reason for hiding this comment

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

Fun, I fixed something similar in update_engine: flatcar/update_engine@ca71b53 - we could even drop the line as it seems to be the default value but it's better to stay explicit.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree about it being better to stay explicit

@github-actions
Copy link

github-actions bot commented Jun 21, 2023

Build action triggered: https://github.com/flatcar/scripts/actions/runs/5342991802

Copy link
Contributor

@tormath1 tormath1 left a comment

Choose a reason for hiding this comment

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

CI is green and the change LGTM. What about a changelog entry (mentioning this change and linking to the original issue: flatcar/Flatcar#1082) ?

@jepio
Copy link
Member Author

jepio commented Jun 22, 2023

Ill add a changelog. I also started a jenkins build to manually verify that the change has taken effect, will report back.
http://192.168.42.7:8080/job/container/job/packages_all_arches/2032/

@tormath1
Copy link
Contributor

Ill add a changelog. I also started a jenkins build to manually verify that the change has taken effect, will report back. http://192.168.42.7:8080/job/container/job/packages_all_arches/2032/

(In case you missed it, it is possible to download the image (amd64|arm64-vm-images) from https://github.com/flatcar/scripts/actions/runs/5333569669)

@jepio
Copy link
Member Author

jepio commented Jun 22, 2023

Oh - i did miss it, thanks!

@jepio
Copy link
Member Author

jepio commented Jun 22, 2023

Pushed a changelog and validated that the inode size change worked and does the desired think (check a file with stat to see nanosecond timestamps).

@jepio jepio merged commit 3613a60 into main Jun 22, 2023
1 check failed
jepio added a commit that referenced this pull request Jun 22, 2023
Switch default ext4 inode size to 256 bytes
jepio added a commit that referenced this pull request Jun 22, 2023
Switch default ext4 inode size to 256 bytes
jepio added a commit that referenced this pull request Jun 22, 2023
Switch default ext4 inode size to 256 bytes
jepio added a commit that referenced this pull request Jun 22, 2023
Switch default ext4 inode size to 256 bytes
@jepio jepio deleted the ext4-inode-size branch June 22, 2023 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Race condition with libuv fs poll
2 participants