File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,19 +185,19 @@ class S3FileIoOptions:
185185 direct_io : bool = False
186186 """
187187 Enable direct IO to bypass the OS cache. Helpful when the disk I/O outperforms the kernel cache.
188- Notes:
188+
189189 - Currently only Linux supports direct I/O. On unsupported platforms, the request transparently
190190 falls back to buffered I/O and a warning is logged.
191191 - Supported for both upload (send_filepath) and download (recv_filepath).
192192 - For upload, part_size MUST be page-aligned when direct_io is enabled (hard fail otherwise).
193193 The client controls part_size and is responsible for ensuring alignment.
194194 - For download, this is a best-effort optimization. The request transparently falls back to
195195 buffered I/O (logging a warning) if any of the following preconditions are not met:
196- - part_size is not page-aligned
197- - For WRITE_TO_POSITION, recv_file_position is not page-aligned
198- - For CREATE_OR_APPEND, the existing file size is not page-aligned
199- - The last part of the download has an unaligned length (only that part falls back)
196+ part_size is not page-aligned, recv_file_position is not page-aligned (WRITE_TO_POSITION),
197+ existing file size is not page-aligned (CREATE_OR_APPEND), or the last part has an
198+ unaligned length (only that part falls back).
200199 - Check NOTES for O_DIRECT for additional info https://man7.org/linux/man-pages/man2/openat.2.html
200+
201201 In summary, O_DIRECT is a potentially powerful tool that should be used with caution.
202202 """
203203
You can’t perform that action at this time.
0 commit comments