Skip to content

Commit

Permalink
md/bitmap: revert a patch
Browse files Browse the repository at this point in the history
This reverts commit 8031c3d. That patches doesn't work well if PAGE_SIZE >
4k. We will fix the original problem with a different approach.

Fix: 8031c3d(md/bitmap: copy correct data for bitmap super)
Reported-by: Joshua Kinard <[email protected]>
Cc: [email protected] (4.10+)
Suggested-by: Neil Brown <[email protected]>
Signed-off-by: Shaohua Li <[email protected]>
  • Loading branch information
shligit committed Oct 17, 2017
1 parent d1d9014 commit 938b533
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ static int bitmap_read_sb(struct bitmap *bitmap)
err = read_sb_page(bitmap->mddev,
offset,
sb_page,
0, PAGE_SIZE);
0, sizeof(bitmap_super_t));
}
if (err)
return err;
Expand Down Expand Up @@ -2123,7 +2123,7 @@ int bitmap_resize(struct bitmap *bitmap, sector_t blocks,
if (store.sb_page && bitmap->storage.sb_page)
memcpy(page_address(store.sb_page),
page_address(bitmap->storage.sb_page),
PAGE_SIZE);
sizeof(bitmap_super_t));
bitmap_file_unmap(&bitmap->storage);
bitmap->storage = store;

Expand Down

0 comments on commit 938b533

Please sign in to comment.