Changes by: szaka
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23832/ntfsprogs
Modified Files:
ntfsresize.c
Log Message:
Fix read-only shrinkage failure if new size was too small by relocating and
writing $Bitmap:$DATA only once. This also improves performance.
Index: ntfsresize.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsresize.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -p -r1.76 -r1.77
--- ntfsresize.c 18 Jul 2005 20:34:41 -0000 1.76
+++ ntfsresize.c 18 Jul 2005 22:09:47 -0000 1.77
@@ -750,6 +750,9 @@ static void collect_relocation_info(ntfs
if (lcn + lcn_length <= new_vol_size)
return;
+ if (inode == FILE_Bitmap && resize->ctx->attr->type == AT_DATA)
+ return;
+
start = lcn;
len = lcn_length;
@@ -1639,6 +1642,10 @@ static void relocate_attributes(ntfs_res
else if (ret == 1)
break;
+ if (resize->mref == FILE_Bitmap &&
+ resize->ctx->attr->type == AT_DATA)
+ break;
+
relocate_attribute(resize);
}
|