diff options
| author | 2026-09-20 14:31:53 +0800 | |
|---|---|---|
| committer | 2026-10-20 18:41:35 +0900 | |
| commit | 406747e46dc8eb73b0976b1e459830927d6022b9 (patch) | |
| tree | b9525bd8ae402ca039df44c422654f8d54394c93 /scripts/Makefile.thinlto | |
| parent | ntfs: require page-aligned full-page attribute writes (diff) | |
ntfs: preserve the 64-bit FITRIM minimum length
The minlen member of struct fstrim_range is a 64-bit byte count, but
ntfs_ioctl_fitrim() uses max_t(u32, ...) to compare it with the device's
discard granularity. This truncates the requested minimum length before
passing it to ntfs_trim_fs().
For example, a minimum length of 4 GiB is reduced to the discard
granularity, allowing smaller free extents to be discarded. The truncated
minimum length is also copied back to userspace.
Use max_t(u64, ...) to preserve the requested minimum length. The bitmap
scan already compares the aligned extent length against range->minlen
using 64-bit values.
Fixes: 9c87959601e8 ("ntfs: update file operations")
Signed-off-by: Xuewen Wang <wangxuewen@kylinos.cn>
Reviewed-by: Baolin Liu <liubaolin@kylinos.cn>
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
