fastpath: Restrict IO to ext4 (data=ordered) or xfs unless HIPFILE_UNSUPPORTED_FILESYSTEMS=true#238
Draft
kurtmcmillan wants to merge 4 commits intodevelopfrom
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the fastpath backend’s eligibility logic to only select fastpath I/O for regular files on ext4 (data=ordered) or xfs by default, with an environment-variable override to permit other filesystems.
Changes:
- Add
HIPFILE_UNSUPPORTED_FILESYSTEMSenvironment plumbing viaEnvironmentandConfiguration. - Update
Fastpath::score()to require a regular file and a supported filesystem (unless overridden). - Extend unit tests to cover the new configuration flag and fastpath filesystem/type gating behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/amd_detail/backend/fastpath.cpp |
Enforces regular-file + supported-filesystem constraints in fastpath scoring. |
src/amd_detail/environment.h |
Adds the new env var constant and accessor declaration. |
src/amd_detail/environment.cpp |
Implements Environment::unsupported_filesystems() via existing bool parser. |
src/amd_detail/configuration.h |
Adds Configuration::unsupportedFilesystems() API. |
src/amd_detail/configuration.cpp |
Reads/caches HIPFILE_UNSUPPORTED_FILESYSTEMS into configuration. |
test/amd_detail/mconfiguration.h |
Extends configuration mock with unsupportedFilesystems(). |
test/amd_detail/configuration.cpp |
Adds tests verifying env var parsing/default behavior for unsupported filesystems flag. |
test/amd_detail/fastpath.cpp |
Updates/extends fastpath tests for mount info + regular file checks and override behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b889b35 to
e927ed3
Compare
This will be used by the to determine if IO to unsupported file systems should be permitted to use the fastpath backend.
…ile system IO to file systems other than ext4 (data=ordered) can be enabled by adding HIPFILE_UNSUPPORTED_FILESYSTEMS=true to the process' environment.
IO to file systems other than ext4(ordered) and xfs can be enabled by adding HIPFILE_UNUSPPORTED_FILESYSTEMS=true to the process' environment.
e927ed3 to
abbeeb1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
hipFile is currently only tested on ext4 (data=ordered) and xfs file systems.
Technical Details
Fastpath::score()has been updated to inspect the mount information of the file. If the file is not a regular file backed by an ext4 (data=ordered) or xfs file system then the IO is rejected.If
HIPFILE_UNSUPPORTED_FILESYSTEMS=trueis set in the environment, thenFastpath::scorewill allow IO to regular files on unsupported filesystems.AIHIPFILE-114