Skip to content

Commit 3a6aba7

Browse files
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>
1 parent dcd9d6a commit 3a6aba7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fs/ntfs3/attrib.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,10 @@ int attr_set_size(struct ntfs_inode *ni, enum ATTR_TYPE type,
448448

449449
is_ext = is_attr_ext(attr_b);
450450
align = sbi->cluster_size;
451-
if (is_ext)
451+
if (is_ext) {
452452
align <<= attr_b->nres.c_unit;
453+
keep_prealloc = false;
454+
}
453455

454456
old_valid = le64_to_cpu(attr_b->nres.valid_size);
455457
old_size = le64_to_cpu(attr_b->nres.data_size);

0 commit comments

Comments
 (0)