aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2011-12-05 17:44:01 -0500
committerJames Bottomley <JBottomley@Parallels.com>2011-12-15 01:57:40 -0500
commit0c70d84b794c9a99f7395b617ecaef34c00d82ec (patch)
tree135e42139e5404d73685c03ff040ce9557a000e8 /include/scsi
parentef8c98543c3ad75240599d4032f7e56b793740a9 (diff)
[SCSI] iscsi class: export pid of process that created
There could be multiple userspace entities creating/destroying/ recoverying sessions and also the kernel's iscsi drivers could be doing this too. If the userspace apps do try to manage the kernel ones it can get the driver/fw out of sync and cause the user to loose the root disk, oopses or ping ponging becasue userspace wants to do one thing but the kernel manager thought we are trying to do another. This patch fixes the problem by just exporting the pid of the entity that created the session. Userspace programs like iscsid, iscsiadm, iscsistart, qlogic's tools, etc, can then figure out which sessions they own and only manage them. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_transport_iscsi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 5994bcc1b017..c54cedc196e8 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -211,6 +211,11 @@ struct iscsi_cls_session {
211 unsigned int target_id; 211 unsigned int target_id;
212 bool ida_used; 212 bool ida_used;
213 213
214 /*
215 * pid of userspace process that created session or -1 if
216 * created by the kernel.
217 */
218 pid_t creator;
214 int state; 219 int state;
215 int sid; /* session id */ 220 int sid; /* session id */
216 void *dd_data; /* LLD private data */ 221 void *dd_data; /* LLD private data */