From 80c3a6ce4ba4470379b9e6a4d9bcd9d2ee26ae03 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 17 Mar 2009 18:10:40 -0700 Subject: md: add 'size' as a personality method In preparation for giving userspace control over ->array_sectors we need to be able to retrieve the 'default' size, and the 'anticipated' size when a reshape is requested. For personalities that do not reshape emit a warning if anything but the default size is requested. In the raid5 case we need to update ->previous_raid_disks to make the new 'default' size available. Reviewed-by: Andre Noll Signed-off-by: Dan Williams --- drivers/md/md.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/md/md.h') diff --git a/drivers/md/md.h b/drivers/md/md.h index 8034f62a9d2..d2c50da1ae7 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -312,6 +312,7 @@ struct mdk_personality int (*spare_active) (mddev_t *mddev); sector_t (*sync_request)(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster); int (*resize) (mddev_t *mddev, sector_t sectors); + sector_t (*size) (mddev_t *mddev, sector_t sectors, int raid_disks); int (*check_reshape) (mddev_t *mddev); int (*start_reshape) (mddev_t *mddev); int (*reconfig) (mddev_t *mddev, int layout, int chunk_size); -- cgit v1.2.3