blob: 0adb941f485a123fdb9c838dc293d8a848c1db76 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#ifndef _MULTIPATH_H
3#define _MULTIPATH_H
4
Linus Torvalds1da177e2005-04-16 15:20:36 -07005struct multipath_info {
NeilBrown3cb03002011-10-11 16:45:26 +11006 struct md_rdev *rdev;
Linus Torvalds1da177e2005-04-16 15:20:36 -07007};
8
NeilBrown69724e22011-10-11 16:48:57 +11009struct mpconf {
NeilBrownfd01b882011-10-11 16:47:53 +110010 struct mddev *mddev;
Linus Torvalds1da177e2005-04-16 15:20:36 -070011 struct multipath_info *multipaths;
12 int raid_disks;
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 spinlock_t device_lock;
14 struct list_head retry_list;
15
16 mempool_t *pool;
17};
18
Linus Torvalds1da177e2005-04-16 15:20:36 -070019/*
Linus Torvalds1da177e2005-04-16 15:20:36 -070020 * this is our 'private' 'collective' MULTIPATH buffer head.
21 * it contains information about what kind of IO operations were started
22 * for this MULTIPATH operation, and about their status:
23 */
24
25struct multipath_bh {
NeilBrownfd01b882011-10-11 16:47:53 +110026 struct mddev *mddev;
Linus Torvalds1da177e2005-04-16 15:20:36 -070027 struct bio *master_bio;
28 struct bio bio;
29 int path;
30 struct list_head retry_list;
31};
32#endif