Fixed reading the MFT bitmap when expanding downward

When expanding downward the MFT bitmap was wrongly read when fragmented,
leading to inconsistencies and cancellation of the process.
edge.strict_endians
Jean-Pierre André 2014-10-20 08:58:04 +02:00
parent e1d2b7faa7
commit 3bfff8ea3f
1 changed files with 2 additions and 1 deletions

View File

@ -3105,7 +3105,8 @@ static u8 *get_mft_bitmap(expand_t *expand)
for (prl=rl; prl->length && ok; prl++) {
lseek_to_cluster(vol,
prl->lcn + expand->cluster_increment);
ok = !read_all(vol->dev, expand->mft_bitmap,
ok = !read_all(vol->dev, expand->mft_bitmap
+ (prl->vcn << vol->cluster_size_bits),
prl->length << vol->cluster_size_bits);
}
if (!ok) {