aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-10-03 04:15:44 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 11:04:16 -0400
commitfbedac04fa11d7f9f9f425c7ec253f55becaae57 (patch)
tree700b49b6ea0da293d07a6a32cc154347e134686f /drivers/md
parent999d816851c3e080412a19558f111d01852d2f04 (diff)
[PATCH] md: the scheduled removal of the START_ARRAY ioctl for md
This patch contains the scheduled removal of the START_ARRAY ioctl for md. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 8dbab2ef3885..3af6f1f06020 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3440,67 +3440,6 @@ static void autorun_devices(int part)
3440 printk(KERN_INFO "md: ... autorun DONE.\n"); 3440 printk(KERN_INFO "md: ... autorun DONE.\n");
3441} 3441}
3442 3442
3443/*
3444 * import RAID devices based on one partition
3445 * if possible, the array gets run as well.
3446 */
3447
3448static int autostart_array(dev_t startdev)
3449{
3450 char b[BDEVNAME_SIZE];
3451 int err = -EINVAL, i;
3452 mdp_super_t *sb = NULL;
3453 mdk_rdev_t *start_rdev = NULL, *rdev;
3454
3455 start_rdev = md_import_device(startdev, 0, 0);
3456 if (IS_ERR(start_rdev))
3457 return err;
3458
3459
3460 /* NOTE: this can only work for 0.90.0 superblocks */
3461 sb = (mdp_super_t*)page_address(start_rdev->sb_page);
3462 if (sb->major_version != 0 ||
3463 sb->minor_version != 90 ) {
3464 printk(KERN_WARNING "md: can only autostart 0.90.0 arrays\n");
3465 export_rdev(start_rdev);
3466 return err;
3467 }
3468
3469 if (test_bit(Faulty, &start_rdev->flags)) {
3470 printk(KERN_WARNING
3471 "md: can not autostart based on faulty %s!\n",
3472 bdevname(start_rdev->bdev,b));
3473 export_rdev(start_rdev);
3474 return err;
3475 }
3476 list_add(&start_rdev->same_set, &pending_raid_disks);
3477
3478 for (i = 0; i < MD_SB_DISKS; i++) {
3479 mdp_disk_t *desc = sb->disks + i;
3480 dev_t dev = MKDEV(desc->major, desc->minor);
3481
3482 if (!dev)
3483 continue;
3484 if (dev == startdev)
3485 continue;
3486 if (MAJOR(dev) != desc->major || MINOR(dev) != desc->minor)
3487 continue;
3488 rdev = md_import_device(dev, 0, 0);
3489 if (IS_ERR(rdev))
3490 continue;
3491
3492 list_add(&rdev->same_set, &pending_raid_disks);
3493 }
3494
3495 /*
3496 * possibly return codes
3497 */
3498 autorun_devices(0);
3499 return 0;
3500
3501}
3502
3503
3504static int get_version(void __user * arg) 3443static int get_version(void __user * arg)
3505{ 3444{
3506 mdu_version_t ver; 3445 mdu_version_t ver;
@@ -4259,27 +4198,6 @@ static int md_ioctl(struct inode *inode, struct file *file,
4259 goto abort; 4198 goto abort;
4260 } 4199 }
4261 4200
4262
4263 if (cmd == START_ARRAY) {
4264 /* START_ARRAY doesn't need to lock the array as autostart_array
4265 * does the locking, and it could even be a different array
4266 */
4267 static int cnt = 3;
4268 if (cnt > 0 ) {
4269 printk(KERN_WARNING
4270 "md: %s(pid %d) used deprecated START_ARRAY ioctl. "
4271 "This will not be supported beyond July 2006\n",
4272 current->comm, current->pid);
4273 cnt--;
4274 }
4275 err = autostart_array(new_decode_dev(arg));
4276 if (err) {
4277 printk(KERN_WARNING "md: autostart failed!\n");
4278 goto abort;
4279 }
4280 goto done;
4281 }
4282
4283 err = mddev_lock(mddev); 4201 err = mddev_lock(mddev);
4284 if (err) { 4202 if (err) {
4285 printk(KERN_INFO 4203 printk(KERN_INFO