You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
pappend_from_file_descriptorto read data from a openedfd, where in my conditionfdis opened withO_DIRECTflag, but the function failed withinvalid argument. I am sure that the offset and size are chunk-aligned, so I guess this is because thememory bufferis not chunk-aligned.iobuf.cpp, it callblockmem_allocate(default is::malloc) to alloc memory forcreate_block, which is not memory-aligned fordirect iooperations. This may be the reason for invalid argument.