[PATCH] md: use queue_hardsect_size instead of block_size for md superblock size...
authorNeilBrown <neilb@suse.de>
Fri, 9 Sep 2005 23:23:59 +0000 (16:23 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 9 Sep 2005 23:39:13 +0000 (16:39 -0700)
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>
drivers/md/md.c

index fd66c39589420f1dc54d706b032206effa9f227b..39b917bc0fc0b4c4e4103f6a64e9db05c6183d09 100644 (file)
@@ -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;