Skip to content
/ linux Public

Commit b67fb01

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 9779a6e commit b67fb01

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
@@ -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)