diff options
| author | Matthias Goergens <matthias.goergens@gmail.com> | 2026-09-30 11:48:31 +0800 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-20 18:41:49 +0900 |
| commit | 26e51efbcb60b2eeddc3e7488fd214a02586851a (patch) | |
| tree | 6828194853dc2360dbf17323741fc9063a0e5302 /scripts/Makefile.thinlto | |
| parent | 2b451a65658fb44017480be8818ab93e9115b420 (diff) | |
| download | linux-26e51efbcb60b2eeddc3e7488fd214a02586851a.tar.gz linux-26e51efbcb60b2eeddc3e7488fd214a02586851a.zip | |
ntfs: do not turn an unmappable runlist fragment into delalloc on write
ntfs_write_simple_iomap_begin_non_resident() has the same unchecked
retry. LCN_RL_NOT_MAPPED passes its "lcn <= LCN_HOLE" test, so a
buffered write into a range whose extent record cannot be read is
merged into the runlist as LCN_DELALLOC over clusters that are already
allocated on disk, and write() succeeds. If the record stays
unreadable, writeback fails too and the data never reaches the disk;
the error only shows up at a later fsync() or a synchronous write.
On the volume from the previous patch, after a read of the file, an
8 KiB pwrite() at vcn 1000 returns 8192, fsync() returns -EIO, and
after remount the range is unchanged.
Fail the lookup here too, with -ENOMEM or -EIO. That pwrite() now
fails with -EIO. Writes whose range can be mapped are unaffected.
Fixes: b041ca562526 ("ntfs: update iomap and address space operations")
Cc: stable@vger.kernel.org
Signed-off-by: Matthias Goergens <matthias.goergens@gmail.com>
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
