-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xfstests: fsx fallocate support is b0rked
The recent fallocate/fpunch additions to fsx have not actually be executing fallocate/fpunch operations. The logic to select what operation to run is broken in such a way that fsx has been executing mapped writes and truncates instead of fallocate and fpunch operations. Remove all the (b0rken) smarty-pants selection logic from the test() function. Replace it with a clearly defined set of operations for each mode and use understandable fallback logic when various operation types have been disabled. Then use a simple switch statement to execute each of the different operations, removing the tortured nesting of if/else statements that only serve to obfuscate the code. As a result, fsx uses fallocate/fpunch appropriately during operations and uses/disableѕ the operations as defined on the command line correctly. Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Alex Elder <[email protected]>
- Loading branch information
Showing
1 changed file
with
123 additions
and
69 deletions.
There are no files selected for viewing
This file contains 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