From 3bfff8ea3fcb6b04391cf289269eb9c17783b64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Mon, 20 Oct 2014 08:58:04 +0200 Subject: [PATCH] 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. --- ntfsprogs/ntfsresize.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ntfsprogs/ntfsresize.c b/ntfsprogs/ntfsresize.c index 1f41966a..ce3b9f54 100644 --- a/ntfsprogs/ntfsresize.c +++ b/ntfsprogs/ntfsresize.c @@ -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) {