From 58c0fed400603a802968b23ddf78f029c5a84e41 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 31 Mar 2009 14:33:13 +1100 Subject: md: Make mddev->size sector-based. This patch renames the "size" field of struct mddev_s to "dev_sectors" and stores the number of 512-byte sectors instead of the number of 1K-blocks in it. All users of that field, including raid levels 1,4-6,10, are adjusted accordingly. This simplifies the code a bit because it allows to get rid of a couple of divisions/multiplications by two. In order to make checkpatch happy, some minor coding style issues have also been addressed. In particular, size_store() now uses strict_strtoull() instead of simple_strtoull(). Signed-off-by: Andre Noll Signed-off-by: NeilBrown --- drivers/md/faulty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/md/faulty.c') diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c index 7b66b9fca29..18793c13727 100644 --- a/drivers/md/faulty.c +++ b/drivers/md/faulty.c @@ -301,7 +301,7 @@ static int run(mddev_t *mddev) list_for_each_entry(rdev, &mddev->disks, same_set) conf->rdev = rdev; - mddev->array_sectors = mddev->size * 2; + mddev->array_sectors = mddev->dev_sectors; mddev->private = conf; reconfig(mddev, mddev->layout, -1); -- cgit v1.2.3