diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-02-18 04:51:58 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-02-18 04:51:58 -0800 |
| commit | 1797a796c7333ed02bfd8883bbaafaec867ddeb2 (patch) | |
| tree | f4f84bd0fcad0d7d135046072cf6a7d8fe945189 /include/linux/raid | |
| parent | 5077fef0ba932822af4f2f15e22bbcd73a0a8da4 (diff) | |
[PATCH] md: Allow partitioning of MD devices.
From: NeilBrown <neilb@cse.unsw.edu.au>
With this patch, md used two major numbers for arrays.
One Major is number 9 with name 'md' have unpartitioned md arrays, one per
minor number.
The other Major is allocated dynamically with name 'mdp' and had on array for
every 64 minors, allowing for upto 63 partitions.
The arrays under one major are completely separate from the arrays under the
other.
The preferred name for devices with the new major are of the form:
/dev/md/d1p3 # partion 3 of device 1 - minor 67
When a paritioned md device is assembled, the partitions are not recognised
until after the whole-array device is opened again. A future version of
mdadm will perform this open so that the need will be transparent.
Diffstat (limited to 'include/linux/raid')
| -rw-r--r-- | include/linux/raid/md_k.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index a89da5378b5f..1e0357ee40d8 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h @@ -186,7 +186,8 @@ struct mddev_s { void *private; mdk_personality_t *pers; - int __minor; + dev_t unit; + int md_minor; struct list_head disks; int sb_dirty; int ro; @@ -235,6 +236,7 @@ struct mddev_s struct semaphore reconfig_sem; atomic_t active; + int changed; /* true if we might need to reread partition info */ int degraded; /* whether md should consider * adding a spare */ @@ -272,15 +274,6 @@ struct mdk_personality_s }; -/* - * Currently we index md_array directly, based on the minor - * number. This will have to change to dynamic allocation - * once we start supporting partitioning of md devices. - */ -static inline int mdidx (mddev_t * mddev) -{ - return mddev->__minor; -} static inline char * mdname (mddev_t * mddev) { return mddev->gendisk ? mddev->gendisk->disk_name : "mdX"; |
