-
Notifications
You must be signed in to change notification settings - Fork 31
Filesystem optimizations #67
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,7 @@ docker rm cnt-"$app_name" || true | |
| docker create --platform linux/amd64 --name cnt-"$app_name" "$IMAGE" /bin/sh | ||
| docker cp cnt-"$app_name":/ ./.rootfs | ||
| rm -f initrd || true | ||
| sudo mkfs.erofs --all-root -d2 -E noinline_data -b 4096 initrd ./.rootfs | ||
| sudo mkfs.erofs --all-root -d2 -E noinline_data,fragments -b 4096 -C 131072 -x 0 -z lz4 initrd ./.rootfs | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The compression block size of 131072 (128KB) is quite large and may increase memory usage during filesystem operations. Consider documenting the minimum EROFS-utils version required (1.6+) for the -C and -z flags, or add version validation to prevent build failures on older systems. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The parameter ordering could be improved for readability. Consider grouping related parameters together, e.g., placing compression-related options (-C, -z) adjacent to each other: |
||
|
|
||
| # Package the unikernel (and the new initrd) to KraftCloud | ||
| kraft pkg \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ docker rm cnt-"$app_name" || true | |
| docker create --platform linux/amd64 --name cnt-"$app_name" "$IMAGE" /bin/sh | ||
| docker cp cnt-"$app_name":/ ./.rootfs | ||
| rm -f initrd || true | ||
| mkfs.erofs --all-root -d2 -E noinline_data -b 4096 initrd ./.rootfs | ||
| mkfs.erofs --all-root -d2 -E noinline_data,fragments -b 4096 -C 131072 -x 0 -z lz4 initrd ./.rootfs | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistency detected: This command doesn't use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The compression block size There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding error handling for the mkfs.erofs command. Since this is a critical step in the build process and the new parameters could potentially fail with older EROFS versions, adding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistency: The headful version uses |
||
|
|
||
| kraft pkg \ | ||
| --name $UKC_INDEX/$IMAGE \ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
-x 0parameter being added here should be documented or explained. The-xflag in mkfs.erofs typically controls xattr features, and setting it to 0 disables extended attribute support. This could impact applications that rely on extended attributes for security contexts, capabilities, or other metadata. Consider documenting why this is being disabled and whether it's intentional for the optimization goals.Agent: 🤖 General