summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorMatthias Goergens <matthias.goergens@gmail.com>2026-10-04 17:56:05 +0800
committerNamjae Jeon <linkinjeon@kernel.org>2026-10-20 18:41:53 +0900
commit4985f322659f1e667226370e4a7129ebd850c990 (patch)
treed330d98604eaaa70b37ce8fcc851f8882544c0e8 /scripts/Makefile.thinlto
parent69ba74e8a5dfc6fd7ba3588e81d53e965566f3a4 (diff)
downloadlinux-4985f322659f1e667226370e4a7129ebd850c990.tar.gz
linux-4985f322659f1e667226370e4a7129ebd850c990.zip
ntfs: set the attribute list size before reserving space for it
ntfs_attrlist_update_locked() resizes the attribute list and then, for $MFT, tries to reserve the maximum list size. When that allocation fails with -ENOSPC it falls back to ntfs_attrlist_repack(), which reads the list through ntfs_inode_attr_pread(). The read stops at i_size, but i_size is only updated after the reserve, so when the list has just grown the repack gets a short read and returns -EIO. Only -ENOSPC from the reserve is ignored, so the -EIO fails the $MFT extension and with it the file creation that needed a new mft record. On a 32 MiB volume with 512-byte clusters whose $MFT has a non-resident attribute list, 591 of 1500 creations of empty files succeed and the rest fail with EIO while 742 KiB is still free: ntfs: (device vda): ntfs_attrlist_update_locked(): Failed to reserve attribute list space ntfs: Failed add attr entry to attrlist ntfs: MP update failed ntfs: (device vda): ntfs_mft_record_alloc(): Failed to extend mft data allocation. Update i_size as soon as the list has been resized. File creation then goes on until the volume is full and fails with ENOSPC. Fixes: b1d732e62a5b ("ntfs: repack $MFT/$ATTRIBUTE LIST") Signed-off-by: Matthias Goergens <matthias.goergens@gmail.com> 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