]> git.neil.brown.name Git - history.git/commit
[PATCH] MD - Rdev list cleanups.
authorNeil Brown <neilb@cse.unsw.edu.au>
Fri, 19 Jul 2002 02:07:59 +0000 (19:07 -0700)
committerTrond Myklebust <trond.myklebust@fys.uio.no>
Fri, 19 Jul 2002 02:07:59 +0000 (19:07 -0700)
commit2a9400e9457cb5bc2bb54c987f38b6f96fa5430e
treea50f9dda9625e870ad0ec18065dc2927983028a7
parent70e96bef8aacd89af3601f63d5d1236071d7d901
[PATCH] MD - Rdev list cleanups.

Rdev list cleanups.

An "rdev" can be on three different lists.
 - the list of all rdevs
 - the list of pending rdevs
 - the list of rdevs for a given mddev

The first list is now only used to list "unused" devices in
/proc/mdstat, and only pending rdevs can be unused, so this list
isn't necessary.
An rdev cannot be both pending and in an mddev, so we know rdev will
only be on one list at at time.

This patch discards  the all_raid_disks list, and changes the
pending list to use "same_set" in the rdev.  It also changes
/proc/mdstat to iterate through pending devices, rather than through
all devices.

So now an rdev is only on one list, either the pending list
or the list of rdevs for a given mddev.  This means that
ITERATE_RDEV_GENERIC doesn't need to be told which field,
to walk down: there is ony one.
drivers/md/md.c
include/linux/raid/md_k.h