erofs: support STATX_DIOALIGN
authorHongbo Li <lihongbo22@huawei.com>
Thu, 18 Jul 2024 08:32:43 +0000 (16:32 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Fri, 26 Jul 2024 10:47:22 +0000 (18:47 +0800)
commit9c421ef3f6b30ab912eaaa3c3d20cfb921fd8c8f
tree1c66f4dabb015eff22bf112f132085340b7c9abe
parenta3c10bed330b7ab401254a0c91098a03b04f1448
erofs: support STATX_DIOALIGN

Add support for STATX_DIOALIGN to EROFS, so that direct I/O
alignment restrictions are exposed to userspace in a generic
way.

[Before]
```
./statx_test /mnt/erofs/testfile
statx(/mnt/erofs/testfile) = 0
dio mem align:0
dio offset align:0
```

[After]
```
./statx_test /mnt/erofs/testfile
statx(/mnt/erofs/testfile) = 0
dio mem align:512
dio offset align:512
```

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240718083243.2485437-1-hsiangkao@linux.alibaba.com
fs/erofs/inode.c