Fixed maintining the allocated size when updating sparse files

When filling a hole in a sparse file, the beginning of the runlist
does not need to be updated. However the allocated size is within
the extent holding its beginning and it needs to be updated.
This commit is contained in:
Jean-Pierre André 2020-11-18 11:33:49 +01:00
parent 7bcae8743f
commit 4b8a660006

View File

@ -5,7 +5,7 @@
* Copyright (c) 2002-2005 Richard Russon
* Copyright (c) 2002-2008 Szabolcs Szakacsits
* Copyright (c) 2004-2007 Yura Pakhuchiy
* Copyright (c) 2007-2015 Jean-Pierre Andre
* Copyright (c) 2007-2020 Jean-Pierre Andre
* Copyright (c) 2010 Erik Larsson
*
* This program/include file is free software; you can redistribute it and/or
@ -5850,6 +5850,9 @@ retry:
& (ATTR_IS_COMPRESSED | ATTR_IS_SPARSE);
if (spcomp)
a->compressed_size = cpu_to_sle64(na->compressed_size);
/* Updating sizes taints the extent holding the attr */
if (ctx->ntfs_ino)
NInoSetDirty(ctx->ntfs_ino);
if ((na->type == AT_DATA) && (na->name == AT_UNNAMED)) {
na->ni->allocated_size
= (spcomp