From 43a145a3440c5c5f24ff2888801e40e2242187e6 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Mon, 16 Oct 2006 18:09:38 -0400 Subject: [SCSI] iscsi class: fix slab corruption during restart The transport class recv mempools are causing slab corruption. We could hack around netlink's lack of mempool support like dm, but it is just too ulgy (dm's hack is ugly enough :) when you need to support broadcast. This patch removes the recv pools. We have not used them even when we were allocting 20 MB per session and the system only had 64 MBs. And we have no pools on the send side and have been ok there. When Peter's work gets merged we can use that since the network guys are in favor of that approach and are not going to add mempools everywhere. Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- include/scsi/scsi_transport_iscsi.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 39e833260bd..4b95c89c95c 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h @@ -29,7 +29,6 @@ struct scsi_transport_template; struct iscsi_transport; struct Scsi_Host; -struct mempool_zone; struct iscsi_cls_conn; struct iscsi_conn; struct iscsi_cmd_task; @@ -157,9 +156,6 @@ struct iscsi_cls_conn { int active; /* must be accessed with the connlock */ struct device dev; /* sysfs transport/container device */ - struct mempool_zone *z_error; - struct mempool_zone *z_pdu; - struct list_head freequeue; }; #define iscsi_dev_to_conn(_dev) \ -- cgit v1.2.3 From 98644047916c24258fb47c3dab2bed8a44f53b83 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Mon, 16 Oct 2006 18:09:39 -0400 Subject: [SCSI] libiscsi: fix oops in connection create failure path If connection creation fails we end up calling list_del on a invalid struct. This then causes an oops. We are not acutally using the lists (old MCS code we thought might be useful elsewhere) so this patch just removes that code. Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- include/scsi/libiscsi.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 401192e56e5..61eebec00a7 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h @@ -136,7 +136,6 @@ struct iscsi_conn { /* control data */ int id; /* CID */ - struct list_head item; /* maintains list of conns */ int c_stage; /* connection state */ /* * Preallocated buffer for pdus that have data but do not @@ -235,10 +234,8 @@ struct iscsi_session { * - mgmtpool, * * - r2tpool */ int state; /* session state */ - struct list_head item; int age; /* counts session re-opens */ - struct list_head connections; /* list of connections */ int cmds_max; /* size of cmds array */ struct iscsi_cmd_task **cmds; /* Original Cmds arr */ struct iscsi_queue cmdpool; /* PDU's pool */ -- cgit v1.2.3 From 5a09e39810ae0465016c380962e12dd115779b87 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Fri, 20 Oct 2006 09:58:47 +0200 Subject: [SCSI] scsi_debug: support REPORT TARGET PORT GROUPS This patch adds support for REPORT TARGET PORT GROUPS. This is used eg for the multipathing priority callout to determine the path priority. With this patch multipath-tools can use the existing mpath_prio_alua callout to exercise the path priority grouping. Signed-off-by: Hannes Reinecke Signed-off-by: Douglas Gilbert Signed-off-by: James Bottomley --- include/scsi/scsi.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 84a6d5fe092..8a3f0bd0d45 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -97,6 +97,7 @@ extern const unsigned char scsi_command_size[8]; #define PERSISTENT_RESERVE_IN 0x5e #define PERSISTENT_RESERVE_OUT 0x5f #define REPORT_LUNS 0xa0 +#define MAINTENANCE_IN 0xa3 #define MOVE_MEDIUM 0xa5 #define EXCHANGE_MEDIUM 0xa6 #define READ_12 0xa8 @@ -114,6 +115,8 @@ extern const unsigned char scsi_command_size[8]; #define SERVICE_ACTION_IN 0x9e /* values for service action in */ #define SAI_READ_CAPACITY_16 0x10 +/* values for maintenance in */ +#define MI_REPORT_TARGET_PGS 0x0a /* Values for T10/04-262r7 */ #define ATA_16 0x85 /* 16-byte pass-thru */ -- cgit v1.2.3 From 4a531e8c79fe459e922347461ccc0f0c13de20d5 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Fri, 20 Oct 2006 09:08:18 +0900 Subject: [SCSI] replace u8 and u32 with __u8 and __u32 in scsi.h for user space Signed-off-by: FUJITA Tomonori Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- include/scsi/scsi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 8a3f0bd0d45..5c0e9791441 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -433,7 +433,7 @@ struct scsi_lun { #define SCSI_IOCTL_GET_PCI 0x5387 /* Pull a u32 out of a SCSI message (using BE SCSI conventions) */ -static inline u32 scsi_to_u32(u8 *ptr) +static inline __u32 scsi_to_u32(__u8 *ptr) { return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3]; } -- cgit v1.2.3