6 #define NODE_NAME_SIZE 19
7 #define PATH_STR_SIZE 16
8 #define PARAMS_SIZE 1024
9 #define FILE_NAME_SIZE 256
10 #define CALLOUT_MAX_SIZE 128
11 #define BLK_DEV_SIZE 33
13 #define SCSI_VENDOR_SIZE 9
14 #define SCSI_PRODUCT_SIZE 17
15 #define SCSI_REV_SIZE 5
17 #define NO_PATH_RETRY_UNDEF 0
18 #define NO_PATH_RETRY_FAIL -1
19 #define NO_PATH_RETRY_QUEUE -2
21 enum free_path_switch {
81 char dev[FILE_NAME_SIZE];
82 struct scsi_idlun scsi_id;
87 char dev[FILE_NAME_SIZE];
88 char dev_t[BLK_DEV_SIZE];
89 struct scsi_idlun scsi_id;
92 char vendor_id[SCSI_VENDOR_SIZE];
93 char product_id[SCSI_PRODUCT_SIZE];
94 char rev[SCSI_REV_SIZE];
95 char serial[SERIAL_SIZE];
96 char tgt_node_name[NODE_NAME_SIZE];
97 unsigned long long size;
98 unsigned int checkint;
108 int (*checkfn) (int, char *, void **);
109 void * checker_context;
110 struct multipath * mpp;
113 /* configlet pointers */
114 struct hwentry * hwe;
118 char wwid[WWID_SIZE];
127 int nr_active; /* current available(= not known as failed) paths */
128 int no_path_retry; /* number of retries after all paths are down */
129 int retry_tick; /* remaining times for retries */
131 unsigned long long size;
134 char params[PARAMS_SIZE];
135 char status[PARAMS_SIZE];
137 /* configlet pointers */
142 struct mpentry * mpe;
143 struct hwentry * hwe;
145 /* daemon store a data blob for DM event waiter threads */
156 struct path * alloc_path (void);
157 struct pathgroup * alloc_pathgroup (void);
158 struct multipath * alloc_multipath (void);
159 void free_path (struct path *);
160 void free_pathvec (vector vec, int free_paths);
161 void free_pathgroup (struct pathgroup * pgp, int free_paths);
162 void free_pgvec (vector pgvec, int free_paths);
163 void free_multipath (struct multipath *, int free_paths);
164 void drop_multipath (vector mpvec, char * wwid, int free_paths);
165 void free_multipathvec (vector mpvec, int free_paths);
167 int store_path (vector pathvec, struct path * pp);
168 int store_pathgroup (vector pgvec, struct pathgroup * pgp);
170 struct multipath * find_mp_by_alias (vector mp, char * alias);
171 struct multipath * find_mp_by_wwid (vector mp, char * wwid);
172 struct multipath * find_mp_by_minor (vector mp, int minor);
174 struct path * find_path_by_devt (vector pathvec, char * devt);
175 struct path * find_path_by_dev (vector pathvec, char * dev);
177 char sysfs_path[FILE_NAME_SIZE];