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

vdev_disk: ensure trim errors are returned immediately #16070

Merged
merged 1 commit into from
Apr 8, 2024

Commits on Apr 8, 2024

  1. vdev_disk: ensure trim errors are returned immediately

    After 06e25f9, the discard issuing code was organised such that if
    requesting an async discard or secure erase failed before the IO was
    issued (that is, calling __blkdev_issue_discard() returned an error),
    the failed zio would never be executed, resulting in txg_sync hanging
    forever waiting for IO to finish.
    
    This commit fixes that by immediately executing a failed zio on error.
    To handle the successful synchronous op case, we fake an async op by,
    when not using an asynchronous submission method, queuing the successful
    result zio as part of the discard handler.
    
    Since it was hard to understand the differences between discard and
    secure erase, and sync and async, across different kernel versions, I've
    commented and reorganised the code a bit to try and make everything more
    contained and linear.
    
    Sponsored-by: Klara, Inc.
    Sponsored-by: Wasabi Technology, Inc.
    Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
    robn committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    a20c1d5 View commit details
    Browse the repository at this point in the history