Fix read-only shrinkage failure if new size was too small by relocating and

writing $Bitmap:$DATA only once. This also improves performance.
edge.strict_endians
szaka 2005-07-18 22:09:47 +00:00
parent 50075bb971
commit d016f808d5
1 changed files with 7 additions and 0 deletions

View File

@ -750,6 +750,9 @@ static void collect_relocation_info(ntfs_resize_t *resize, runlist *rl)
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_resize_t *resize)
else if (ret == 1)
break;
if (resize->mref == FILE_Bitmap &&
resize->ctx->attr->type == AT_DATA)
break;
relocate_attribute(resize);
}