From d571b4837480e5370e90b140ca623b355385da9b Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Wed, 30 Oct 2002 00:04:30 -0800 Subject: [PATCH] md: factor out MD superblock handling code Define an interface for interpreting and updating superblocks so we can more easily define new formats. With this patch, (almost) all superblock layout information is locating in a small set of routines dedicated to superblock handling. This will allow us to provide a similar set for a different format. The two exceptions are: 1/ autostart_array where the devices listed in the superblock are searched for. 2/ raid5 'knows' the maximum number of devices for compute_parity. These will be addressed in a later patch. --- include/linux/raid/md_k.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/linux/raid') diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 453324c18bdd..f658735d28b2 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h @@ -151,8 +151,9 @@ struct mdk_rdev_s struct block_device *bdev; /* block device handle */ struct page *sb_page; - mdp_super_t *sb; + int sb_loaded; sector_t sb_offset; + int preferred_minor; /* autorun support */ /* A device can be in one of three states based on two flags: * Not working: faulty==1 in_sync==0 @@ -196,6 +197,7 @@ struct mddev_s time_t ctime, utime; int level, layout; int raid_disks; + int max_disks; unsigned long state; sector_t size; /* used size of component devices */ __u64 events; -- cgit v1.2.3