Skip to content

Commit

Permalink
md: don't reference gendisk in getgeo
Browse files Browse the repository at this point in the history
Using ->array_sectors rather than get_capacity() is more
direct and is a step towards relaxing the tight connection
between mddev and gendisk.

Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
NeilBrown committed May 18, 2010
1 parent 4907732 commit 49ce6ce
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 @@ -5556,7 +5556,7 @@ static int md_getgeo(struct block_device *bdev, struct hd_geometry *geo)

geo->heads = 2;
geo->sectors = 4;
geo->cylinders = get_capacity(mddev->gendisk) / 8;
geo->cylinders = mddev->array_sectors / 8;
return 0;
}

Expand Down

0 comments on commit 49ce6ce

Please sign in to comment.