Skip to content
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

Fix segfault in XDD when buffer file is smaller than reqsize with -datapattern wholefile #39

Merged
merged 1 commit into from
Oct 7, 2024

Commits on Oct 4, 2024

  1. Fix segfault in XDD when buffer file is smaller than reqsize with -da…

    …tapattern wholefile (MigeljanImeri#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 <79346293+cadegore@users.noreply.github.com>
    cadegore committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    13dd51a View commit details
    Browse the repository at this point in the history