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
parent
50075bb971
commit
d016f808d5
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue