Skip to content

Strange passing of cb_fn in _nvme_ns_split_request #7

Description

@waddlesplash

When the request is larger than the maximum IO size OR striping is enabled, _nvme_ns_split_request will be used to break the request up into multiple ones: https://github.com/hgst/libnvme/blob/master/lib/nvme/nvme_ns.c#L231

However, it just passes the cb_fn to each of these. So any consumer of this API will have the cb_fn called more than once, and it cannot be reasonably expected to keep track of how many sub-requests there are and when the last one has completed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions