-
Notifications
You must be signed in to change notification settings - Fork 30
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
tarfs reliability fixes #160
Conversation
If we don't keep it up to date, d_off will be incorrect, so callers will seek to the wrong position if they ever try to use d_off. Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
If we run into an error while listing the contents of a directory, don't fail the whole request if we already emitted at least one entry. Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
Without this, the lock would stay locked indefinitely. Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
These checks will never trigger for valid images but they are useful when dealing with corrupted or malicious images: although not strictly necessary as block devices should reject such read attempts, having them is a good security-in-depth approach because it protects the block layer. Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
This the right function to call on failure because it unhashes the inode, which will cause any waiters (e.g., callers of ilookup or iget_locked) to retry after waiting for inode init to complete. Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
This check ensures that the expression below to determine the superblock position won't underflow. Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
When a mounted filesystem needs memory that isn't available, this flag instructs the kernel allocator to not request (and wait for) file systems to shrink caches because it may lead to deadlocks. Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
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.
Pending CI results
Should this patch set be added here or is that just a historical archive? |
Hey Malte, That’s our archive upstream tarfs repo which hasn’t been updated recently. @wedsonaf is actively involved in the process of upstreaming the tarfs module to the main Linux kernel. For the most recent updates and fixes to tarfs, we always push them to the msft-main branch for internal testing first. |
Merge Checklist
upstream-missing
label (orupstream-not-needed
) has been set on the PR.Summary
Fixes related to rarely exercised paths like failure or partial failure paths, tiny block devices (e.g., size of a single sector), corrupted images, etc.
Upstreaming to kata-containers is not necessary because we are hosting this in a different repo.
Test Methodology
Built the kernel module locally in 5.15 and 6.1 kernels, booted an image with busybox, loaded the module, mounted a tarfs file system and used it.