Query direct I/O alignment requirements for a filesystem path.
Overview
dio-align reports the logical and physical block sizes required for direct I/O alignment on the
filesystem backing a given path. On Linux 6.1+ it also reports the required memory alignment when
statx(DIOALIGN) is available.
Installation
[]
= "0.1"
Usage
use fetch;
Platform notes
- Linux 6.1+: uses
statx(DIOALIGN)for memory and logical alignment and sysfs for physical size. - Linux < 6.1: uses block device ioctls and sysfs; memory alignment is not available.
- macOS and other Apple OSes: uses
statfsand reportsf_bsizeandf_iosize. - Windows: uses
GetDiskFreeSpaceWfor logical size and storage property queries for physical size. Physical size may fall back to the logical size if the query is not supported.
License
dio-align is under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.
Copyright (c) 2026 Al Liu.