Skip to content

Commit

Permalink
[PATCH] md: use queue_hardsect_size instead of block_size for md supe…
Browse files Browse the repository at this point in the history
…rblock size calc.

Doh.  I want the physical hard-sector-size, not the current block size...

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Sep 9, 2005
1 parent 53e87fb commit 720a3dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version)
rdev->data_offset = le64_to_cpu(sb->data_offset);

rdev->sb_size = le32_to_cpu(sb->max_dev) * 2 + 256;
bmask = block_size(rdev->bdev)-1;
bmask = queue_hardsect_size(rdev->bdev->bd_disk->queue)-1;
if (rdev->sb_size & bmask)
rdev-> sb_size = (rdev->sb_size | bmask)+1;

Expand Down

0 comments on commit 720a3dc

Please sign in to comment.