forked from bwatkinson/xdd
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix segfault in XDD when buffer file is smaller than reqsize with -da…
…tapattern wholefile (#38) This commit rewrites the logic for handling the -datapattern wholefile option to ensure that even when the blocksize (bs) is smaller than the request size (reqsize), the code runs without segmentation faults. The changes include calculating the offset within the data pattern buffer, allocating a buffer if not already allocated, and copying data in chunks from the data pattern to the buffer until the entire transfer size is copied. The offset is correctly calculated and reset after the first iteration. In addition, a test case also added to verify that the code correctly handles cases where the blocksize is smaller than the request size. The test compares the input file and output file to ensure they match and that the offset is correctly calculated with different numbers of queue depth (qd). Signed-off-by: Cade Gore <[email protected]>
- Loading branch information
Showing
2 changed files
with
157 additions
and
67 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
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