#define SG_ERR_DRIVER_SENSE 0x08
/* exerpt from "scsi.h" */
-#define RECOVERED_ERROR 0x01
#define SCSI_IOCTL_GET_IDLUN 0x5382
#define SCSI_IOCTL_GET_BUS_NUMBER 0x5386
/* global defs */
#define WWID_SIZE 33
+#define SERIAL_SIZE 14
#define MAX_DEVS 128
#define MAX_MP MAX_DEVS / 2
#define MAX_MP_PATHS MAX_DEVS / 4
#define FILE_NAME_SIZE 256
-#define INQUIRY_CMDLEN 6
-#define INQUIRY_CMD 0x12
-#define SENSE_BUFF_LEN 32
#define DEF_TIMEOUT 60000
#define EBUFF_SZ 256
#define TUR_CMD_LEN 6
-#define MX_ALLOC_LEN 255
-#define BLKGETSIZE _IO(0x12,96)
#define DM_TARGET "multipath"
+/* Storage controlers cpabilities */
+#define FAILOVER 0
+#define MULTIBUS 1
+#define GROUP_BY_SERIAL 2
+
#define PINDEX(x,y) mp[(x)].pindex[(y)]
/* global types */
char sg_dev[FILE_NAME_SIZE];
struct scsi_idlun scsi_id;
struct sg_id sg_id;
- int state;
char wwid[WWID_SIZE];
char vendor_id[8];
char product_id[16];
char rev[4];
+ char serial[SERIAL_SIZE];
+ int iopolicy;
};
struct multipath {
char wwid[WWID_SIZE];
int npaths;
+ long size;
int pindex[MAX_MP_PATHS];
};
int verbose;
int quiet;
int dry_run;
+ int forcedfailover;
int with_sysfs;
int dm_path_test_int;
char sysfs_path[FILE_NAME_SIZE];