diff --git a/awscrt/s3.py b/awscrt/s3.py index 2a732f5ff..c77f32c81 100644 --- a/awscrt/s3.py +++ b/awscrt/s3.py @@ -185,10 +185,19 @@ class S3FileIoOptions: direct_io: bool = False """ Enable direct IO to bypass the OS cache. Helpful when the disk I/O outperforms the kernel cache. - Notes: - - Only supported on linux for now. - - Only supports upload for now. + + - Currently only Linux supports direct I/O. On unsupported platforms, the request transparently + falls back to buffered I/O and a warning is logged. + - Supported for both upload (send_filepath) and download (recv_filepath). + - For upload, part_size MUST be page-aligned when direct_io is enabled (hard fail otherwise). + The client controls part_size and is responsible for ensuring alignment. + - For download, this is a best-effort optimization. The request transparently falls back to + buffered I/O (logging a warning) if any of the following preconditions are not met: + part_size is not page-aligned, recv_file_position is not page-aligned (WRITE_TO_POSITION), + existing file size is not page-aligned (CREATE_OR_APPEND), or the last part has an + unaligned length (only that part falls back). - Check NOTES for O_DIRECT for additional info https://man7.org/linux/man-pages/man2/openat.2.html + In summary, O_DIRECT is a potentially powerful tool that should be used with caution. """ diff --git a/crt/aws-c-common b/crt/aws-c-common index 48dd6cdff..2b4c620fe 160000 --- a/crt/aws-c-common +++ b/crt/aws-c-common @@ -1 +1 @@ -Subproject commit 48dd6cdff7bac0005a9c6b49c15a0765622c0e70 +Subproject commit 2b4c620fecec43fb847da3d2064ce023ebfd3ef9 diff --git a/crt/aws-c-s3 b/crt/aws-c-s3 index dd71b3be7..9bcccf21b 160000 --- a/crt/aws-c-s3 +++ b/crt/aws-c-s3 @@ -1 +1 @@ -Subproject commit dd71b3be7d2545d1470cd20464742fef297d50d3 +Subproject commit 9bcccf21bbbef08fda20efacb50b8a180e63f0ac diff --git a/crt/aws-c-sdkutils b/crt/aws-c-sdkutils index f678bda9e..727df06fc 160000 --- a/crt/aws-c-sdkutils +++ b/crt/aws-c-sdkutils @@ -1 +1 @@ -Subproject commit f678bda9e21f7217e4bbf35e0d1ea59540687933 +Subproject commit 727df06fc0e998e673de70fb69e5a634fe4979bc diff --git a/crt/aws-lc b/crt/aws-lc index 44766fa7d..6f246af4c 160000 --- a/crt/aws-lc +++ b/crt/aws-lc @@ -1 +1 @@ -Subproject commit 44766fa7daa88e5afc7fc6de3311c48eeeb02f39 +Subproject commit 6f246af4cd1de8cee8c62d76139bcda299c1aa00