提交 720a3dc3 编写于 作者: N NeilBrown 提交者: Linus Torvalds

[PATCH] md: use queue_hardsect_size instead of block_size for md superblock size calc.

Doh.  I want the physical hard-sector-size, not the current block size...
Signed-off-by: NNeil Brown <neilb@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 53e87fbb
...@@ -898,7 +898,7 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version) ...@@ -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->data_offset = le64_to_cpu(sb->data_offset);
rdev->sb_size = le32_to_cpu(sb->max_dev) * 2 + 256; 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) if (rdev->sb_size & bmask)
rdev-> sb_size = (rdev->sb_size | bmask)+1; rdev-> sb_size = (rdev->sb_size | bmask)+1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册