diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2002-08-22 21:26:27 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-08-22 21:26:27 -0700 |
| commit | 3e98f2fb3d7dd2496667353713317ae353a89522 (patch) | |
| tree | 6bf8fe054b28ab1abb057aa7a489af258c765548 /include/linux | |
| parent | fff3986f4b2bca00291c8550945b7d890216e6fd (diff) | |
[PATCH] md: Keep track of number of pending requests on each component device on an MD array
This will allow us to know, in the event of a device failure, when the
device is completely unused and so can be disconnected from the
array. Currently this isn't a problem as drives aren't normally disconnect
until after a repacement has been rebuilt, which is a LONG TIME, but that
will change shortly...
We always increment the count under a spinlock after checking that
it hasn't been disconnected already (rdev!= NULL).
We disconnect under the same spinlock after checking that the
count is zero.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/raid/md_k.h | 5 | ||||
| -rw-r--r-- | include/linux/raid/raid1.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index b2d38ac30780..4fb0e1a51155 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h @@ -160,6 +160,11 @@ struct mdk_rdev_s int desc_nr; /* descriptor index in the superblock */ int raid_disk; /* role of device in array */ + + atomic_t nr_pending; /* number of pending requests. + * only maintained for arrays that + * support hot removal + */ }; typedef struct mdk_personality_s mdk_personality_t; diff --git a/include/linux/raid/raid1.h b/include/linux/raid/raid1.h index a27ed231c596..9cd479ad2acb 100644 --- a/include/linux/raid/raid1.h +++ b/include/linux/raid/raid1.h @@ -8,7 +8,6 @@ typedef struct mirror_info mirror_info_t; struct mirror_info { mdk_rdev_t *rdev; sector_t head_position; - atomic_t nr_pending; /* * State bits: |
