Skip to content
/ linux Public

Commit f37db54

Browse files
aalexandrovichSasha Levin
authored andcommitted
fs/ntfs3: drop preallocated clusters for sparse and compressed files
[ Upstream commit 3a6aba7 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 976e6a7 commit f37db54

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/ntfs3/attrib.c

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

474474
is_ext = is_attr_ext(attr_b);
475475
align = sbi->cluster_size;
476-
if (is_ext)
476+
if (is_ext) {
477477
align <<= attr_b->nres.c_unit;
478+
keep_prealloc = false;
479+
}
478480

479481
old_valid = le64_to_cpu(attr_b->nres.valid_size);
480482
old_size = le64_to_cpu(attr_b->nres.data_size);

0 commit comments

Comments
 (0)