mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 10:04:00 +08:00
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:
parent
7bcae8743f
commit
4b8a660006
@ -5,7 +5,7 @@
|
|||||||
* Copyright (c) 2002-2005 Richard Russon
|
* Copyright (c) 2002-2005 Richard Russon
|
||||||
* Copyright (c) 2002-2008 Szabolcs Szakacsits
|
* Copyright (c) 2002-2008 Szabolcs Szakacsits
|
||||||
* Copyright (c) 2004-2007 Yura Pakhuchiy
|
* 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
|
* Copyright (c) 2010 Erik Larsson
|
||||||
*
|
*
|
||||||
* This program/include file is free software; you can redistribute it and/or
|
* This program/include file is free software; you can redistribute it and/or
|
||||||
@ -5850,6 +5850,9 @@ retry:
|
|||||||
& (ATTR_IS_COMPRESSED | ATTR_IS_SPARSE);
|
& (ATTR_IS_COMPRESSED | ATTR_IS_SPARSE);
|
||||||
if (spcomp)
|
if (spcomp)
|
||||||
a->compressed_size = cpu_to_sle64(na->compressed_size);
|
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)) {
|
if ((na->type == AT_DATA) && (na->name == AT_UNNAMED)) {
|
||||||
na->ni->allocated_size
|
na->ni->allocated_size
|
||||||
= (spcomp
|
= (spcomp
|
||||||
|
Loading…
Reference in New Issue
Block a user