]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] md: Remove 'alias_device' flag.
authorNeil Brown <neilb@cse.unsw.edu.au>
Fri, 23 Aug 2002 04:27:13 +0000 (21:27 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 23 Aug 2002 04:27:13 +0000 (21:27 -0700)
This flag was used by multipath to make sure only
one superblock was written, as there is only one
real device.

The relevant test is now more explicitly dependant on multipath,
and the flag is gone.

drivers/md/md.c
include/linux/raid/md_k.h

index 91cb89defaa21b17aa748c1c67d87cfa573263c2..4a47cb9ffbf1081355370d5e9bc494cae5fa6d62 100644 (file)
@@ -906,8 +906,6 @@ static void sync_sbs(mddev_t * mddev)
        ITERATE_RDEV(mddev,rdev,tmp) {
                mdp_super_t *this_sb;
                
-               if (rdev->faulty || rdev->alias_device)
-                       continue;
                this_sb = rdev->sb;
                if (this_sb != sb)
                        *this_sb = *sb;
@@ -953,16 +951,17 @@ repeat:
                printk(KERN_INFO "md: ");
                if (rdev->faulty)
                        printk("(skipping faulty ");
-               if (rdev->alias_device)
-                       printk("(skipping alias ");
 
                printk("%s ", bdev_partition_name(rdev->bdev));
-               if (!rdev->faulty && !rdev->alias_device) {
+               if (!rdev->faulty) {
                        printk("[events: %08lx]",
                                (unsigned long)rdev->sb->events_lo);
                        err += write_disk_sb(rdev);
                } else
                        printk(")\n");
+               if (!err && mddev->level == LEVEL_MULTIPATH)
+                       /* only need to write one superblock... */
+                       break;
        }
        if (err) {
                if (--count) {
@@ -1196,7 +1195,6 @@ static int analyze_sbs(mddev_t * mddev)
        i = 0;
        ITERATE_RDEV(mddev,rdev,tmp) {
                if (mddev->level == LEVEL_MULTIPATH) {
-                       rdev->alias_device = !!i;
                        rdev->desc_nr = i++;
                        rdev->raid_disk = rdev->desc_nr;
                        rdev->in_sync = 1;
index 49fe38181bfb601d1d9670f1c998258aea4166f1..721aa5d478d0d0563c1e7f126ba560c23c539a0b 100644 (file)
@@ -154,7 +154,6 @@ struct mdk_rdev_s
        mdp_super_t     *sb;
        unsigned long   sb_offset;
 
-       int alias_device;               /* device alias to the same disk */
        int faulty;                     /* if faulty do not issue IO requests */
        int in_sync;                    /* device is a full member of the array */