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 enum free_path_switch {
71 char dev[FILE_NAME_SIZE];
72 struct scsi_idlun scsi_id;
77 char dev[FILE_NAME_SIZE];
78 char dev_t[BLK_DEV_SIZE];
79 struct scsi_idlun scsi_id;
82 char vendor_id[SCSI_VENDOR_SIZE];
83 char product_id[SCSI_PRODUCT_SIZE];
84 char rev[SCSI_REV_SIZE];
85 char serial[SERIAL_SIZE];
86 char tgt_node_name[NODE_NAME_SIZE];
87 unsigned long long size;
88 unsigned int checkint;
99 int (*checkfn) (int, char *, void **);
100 void * checker_context;
101 struct multipath * mpp;
104 /* configlet pointers */
105 struct hwentry * hwe;
109 char wwid[WWID_SIZE];
118 unsigned long long size;
121 char params[PARAMS_SIZE];
122 char status[PARAMS_SIZE];
124 /* configlet pointers */
129 struct mpentry * mpe;
130 struct hwentry * hwe;
132 /* daemon store a data blob for DM event waiter threads */
143 struct path * alloc_path (void);
144 struct pathgroup * alloc_pathgroup (void);
145 struct multipath * alloc_multipath (void);
146 void free_path (struct path *);
147 void free_pathvec (vector vec, int free_paths);
148 void free_pathgroup (struct pathgroup * pgp, int free_paths);
149 void free_pgvec (vector pgvec, int free_paths);
150 void free_multipath (struct multipath *, int free_paths);
151 void drop_multipath (vector mpvec, char * wwid, int free_paths);
152 void free_multipathvec (vector mpvec, int free_paths);
154 int store_path (vector pathvec, struct path * pp);
155 int store_pathgroup (vector pgvec, struct pathgroup * pgp);
157 struct multipath * find_mp (vector mp, char * alias);
158 struct multipath * find_mp_by_wwid (vector mp, char * wwid);
159 struct multipath * find_mp_by_minor (vector mp, int minor);
161 struct path * find_path_by_devt (vector pathvec, char * devt);
162 struct path * find_path_by_dev (vector pathvec, char * dev);
164 char sysfs_path[FILE_NAME_SIZE];