Skip to content

Does IOPortal consider to support to create memory aligned block for direct IO #993

@lpstudy

Description

@lpstudy
  1. IOPortal calls pappend_from_file_descriptor to read data from a opened fd, where in my condition fd is opened with O_DIRECT flag, but the function failed with invalid argument. I am sure that the offset and size are chunk-aligned, so I guess this is because the memory buffer is not chunk-aligned.
  2. I read iobuf.cpp, it call blockmem_allocate (default is ::malloc) to alloc memory for create_block, which is not memory-aligned for direct io operations. This may be the reason for invalid argument.
  3. Do we have plan for memory-aligned block allocation or in deed is there a way to achieve this goal. I want to minimize the data copy as fewer as possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions