aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/raid
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-01-08 16:31:10 -0500
committerNeilBrown <neilb@suse.de>2009-01-08 16:31:10 -0500
commitefeb53c0e57213e843b7ef3cc6ebcdea7d6186ac (patch)
treeef580effd8809fb0bc5d6ffa6f3b8abaa9180539 /include/linux/raid
parentd3374825ce57ba2214d375023979f6197ccc1385 (diff)
md: Allow md devices to be created by name.
Using sequential numbers to identify md devices is somewhat artificial. Using names can be a lot more user-friendly. Also, creating md devices by opening the device special file is a bit awkward. So this patch provides a new option for creating and naming devices. Writing a name such as "md_home" to /sys/modules/md_mod/parameters/new_array will cause an array with that name to be created. It will appear in /sys/block/ /proc/partitions and /proc/mdstat as 'md_home'. It will have an arbitrary minor number allocated. md devices that a created by an open are destroyed on the last close when the device is inactive. For named md devices, they will not be destroyed until the array is explicitly stopped, either with the STOP_ARRAY ioctl or by writing 'clear' to /sys/block/md_XXXX/md/array_state. The name of the array must start 'md_' to avoid conflict with other devices. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'include/linux/raid')
-rw-r--r--include/linux/raid/md_k.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index e3d17c7f954e..dac4217194b8 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -139,6 +139,7 @@ struct mddev_s
139 struct kobject kobj; 139 struct kobject kobj;
140 int hold_active; 140 int hold_active;
141#define UNTIL_IOCTL 1 141#define UNTIL_IOCTL 1
142#define UNTIL_STOP 2
142 143
143 /* Superblock information */ 144 /* Superblock information */
144 int major_version, 145 int major_version,