summaryrefslogtreecommitdiff
path: root/include/linux/raid
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2002-07-18 19:07:01 -0700
committerTrond Myklebust <trond.myklebust@fys.uio.no>2002-07-18 19:07:01 -0700
commite3de153e7a5c327619ea564046d937af5ae75924 (patch)
tree30d41c1f8554c54f5b907d7afbf96608b4a71517 /include/linux/raid
parent8e2a19e732d3d0f90cf425304c2c88c2b478db74 (diff)
[PATCH] MD - Embed bio in mp_bh rather than separate allocation.
Embed bio in mp_bh rather than separate allocation. multipath currently allocates an mp_bh and a bio for each request. With this patch, the bio is made to be part of the mp_bh so there is only one allocation, and it from a private pool (the bio was allocated from a shared pool). Also remove "remaining" and "cmd" from mp_bh which aren't used. And remove spare (unused) from multipath_private_data.
Diffstat (limited to 'include/linux/raid')
-rw-r--r--include/linux/raid/multipath.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/linux/raid/multipath.h b/include/linux/raid/multipath.h
index f34b54b83767..886448c201fc 100644
--- a/include/linux/raid/multipath.h
+++ b/include/linux/raid/multipath.h
@@ -2,6 +2,7 @@
#define _MULTIPATH_H
#include <linux/raid/md.h>
+#include <linux/bio.h>
struct multipath_info {
int number;
@@ -24,7 +25,6 @@ struct multipath_private_data {
int raid_disks;
int working_disks;
mdk_thread_t *thread;
- struct multipath_info *spare;
spinlock_t device_lock;
mempool_t *pool;
@@ -45,13 +45,9 @@ typedef struct multipath_private_data multipath_conf_t;
*/
struct multipath_bh {
- atomic_t remaining; /* 'have we finished' count,
- * used from IRQ handlers
- */
- int cmd;
mddev_t *mddev;
struct bio *master_bio;
- struct bio *bio;
- struct multipath_bh *next_mp; /* next for retry or in free list */
+ struct bio bio;
+ struct multipath_bh *next_mp; /* next for retry */
};
#endif