summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2025-12-12 14:27:48 +0300
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2025-12-29 16:33:29 +0300
commit3a6aba7f3cf2b46816e08548c254d98de9c74eba (patch)
tree99dee485bebc943a6b193e2cfba1c95c5072b68a
parentdcd9d6a47199565d83d61a11bbf91fa2ade4d676 (diff)
downloadlinux-3a6aba7f3cf2b46816e08548c254d98de9c74eba.tar.xz
fs/ntfs3: drop preallocated clusters for sparse and compressed files
Do not keep preallocated clusters for sparsed and compressed files. Preserving preallocation in these cases causes fsx failures when running with sparse files and preallocation enabled. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
-rw-r--r--fs/ntfs3/attrib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c
index c45880ab2391..0cd15a0983fe 100644
--- a/fs/ntfs3/attrib.c
+++ b/fs/ntfs3/attrib.c
@@ -448,8 +448,10 @@ again:
is_ext = is_attr_ext(attr_b);
align = sbi->cluster_size;
- if (is_ext)
+ if (is_ext) {
align <<= attr_b->nres.c_unit;
+ keep_prealloc = false;
+ }
old_valid = le64_to_cpu(attr_b->nres.valid_size);
old_size = le64_to_cpu(attr_b->nres.data_size);