diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2008-05-21 16:53:58 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-07-12 09:22:15 -0400 |
commit | 32c6e1b9a2e27076b7070a9ec56a9e5437ebd725 (patch) | |
tree | 9a6e1df9b42d96e04607efb3c5accbb41c532ad6 /drivers/scsi/scsi_transport_iscsi.c | |
parent | d3826721b198001c55353b1c54e10843068aae63 (diff) |
[SCSI] iscsi class: rename iscsi_host to iscsi_cls_host
This renames the iscsi_host to iscsi_cls_host to match the other
structs, because libiscsi wants to use the iscsi_host name in
the future.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index e6a090e9c8a4..5577a60bec4e 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -114,13 +114,11 @@ static struct attribute_group iscsi_transport_group = { | |||
114 | .attrs = iscsi_transport_attrs, | 114 | .attrs = iscsi_transport_attrs, |
115 | }; | 115 | }; |
116 | 116 | ||
117 | |||
118 | |||
119 | static int iscsi_setup_host(struct transport_container *tc, struct device *dev, | 117 | static int iscsi_setup_host(struct transport_container *tc, struct device *dev, |
120 | struct device *cdev) | 118 | struct device *cdev) |
121 | { | 119 | { |
122 | struct Scsi_Host *shost = dev_to_shost(dev); | 120 | struct Scsi_Host *shost = dev_to_shost(dev); |
123 | struct iscsi_host *ihost = shost->shost_data; | 121 | struct iscsi_cls_host *ihost = shost->shost_data; |
124 | 122 | ||
125 | memset(ihost, 0, sizeof(*ihost)); | 123 | memset(ihost, 0, sizeof(*ihost)); |
126 | INIT_LIST_HEAD(&ihost->sessions); | 124 | INIT_LIST_HEAD(&ihost->sessions); |
@@ -140,7 +138,7 @@ static int iscsi_remove_host(struct transport_container *tc, struct device *dev, | |||
140 | struct device *cdev) | 138 | struct device *cdev) |
141 | { | 139 | { |
142 | struct Scsi_Host *shost = dev_to_shost(dev); | 140 | struct Scsi_Host *shost = dev_to_shost(dev); |
143 | struct iscsi_host *ihost = shost->shost_data; | 141 | struct iscsi_cls_host *ihost = shost->shost_data; |
144 | 142 | ||
145 | destroy_workqueue(ihost->scan_workq); | 143 | destroy_workqueue(ihost->scan_workq); |
146 | return 0; | 144 | return 0; |
@@ -293,7 +291,7 @@ static int iscsi_is_session_dev(const struct device *dev) | |||
293 | */ | 291 | */ |
294 | int iscsi_scan_finished(struct Scsi_Host *shost, unsigned long time) | 292 | int iscsi_scan_finished(struct Scsi_Host *shost, unsigned long time) |
295 | { | 293 | { |
296 | struct iscsi_host *ihost = shost->shost_data; | 294 | struct iscsi_cls_host *ihost = shost->shost_data; |
297 | /* | 295 | /* |
298 | * qla4xxx will have kicked off some session unblocks before calling | 296 | * qla4xxx will have kicked off some session unblocks before calling |
299 | * scsi_scan_host, so just wait for them to complete. | 297 | * scsi_scan_host, so just wait for them to complete. |
@@ -305,7 +303,7 @@ EXPORT_SYMBOL_GPL(iscsi_scan_finished); | |||
305 | static int iscsi_user_scan(struct Scsi_Host *shost, uint channel, | 303 | static int iscsi_user_scan(struct Scsi_Host *shost, uint channel, |
306 | uint id, uint lun) | 304 | uint id, uint lun) |
307 | { | 305 | { |
308 | struct iscsi_host *ihost = shost->shost_data; | 306 | struct iscsi_cls_host *ihost = shost->shost_data; |
309 | struct iscsi_cls_session *session; | 307 | struct iscsi_cls_session *session; |
310 | 308 | ||
311 | mutex_lock(&ihost->mutex); | 309 | mutex_lock(&ihost->mutex); |
@@ -325,7 +323,7 @@ static void iscsi_scan_session(struct work_struct *work) | |||
325 | struct iscsi_cls_session *session = | 323 | struct iscsi_cls_session *session = |
326 | container_of(work, struct iscsi_cls_session, scan_work); | 324 | container_of(work, struct iscsi_cls_session, scan_work); |
327 | struct Scsi_Host *shost = iscsi_session_to_shost(session); | 325 | struct Scsi_Host *shost = iscsi_session_to_shost(session); |
328 | struct iscsi_host *ihost = shost->shost_data; | 326 | struct iscsi_cls_host *ihost = shost->shost_data; |
329 | unsigned long flags; | 327 | unsigned long flags; |
330 | 328 | ||
331 | spin_lock_irqsave(&session->lock, flags); | 329 | spin_lock_irqsave(&session->lock, flags); |
@@ -377,7 +375,7 @@ static void __iscsi_unblock_session(struct work_struct *work) | |||
377 | container_of(work, struct iscsi_cls_session, | 375 | container_of(work, struct iscsi_cls_session, |
378 | unblock_work); | 376 | unblock_work); |
379 | struct Scsi_Host *shost = iscsi_session_to_shost(session); | 377 | struct Scsi_Host *shost = iscsi_session_to_shost(session); |
380 | struct iscsi_host *ihost = shost->shost_data; | 378 | struct iscsi_cls_host *ihost = shost->shost_data; |
381 | unsigned long flags; | 379 | unsigned long flags; |
382 | 380 | ||
383 | /* | 381 | /* |
@@ -445,7 +443,7 @@ static void __iscsi_unbind_session(struct work_struct *work) | |||
445 | container_of(work, struct iscsi_cls_session, | 443 | container_of(work, struct iscsi_cls_session, |
446 | unbind_work); | 444 | unbind_work); |
447 | struct Scsi_Host *shost = iscsi_session_to_shost(session); | 445 | struct Scsi_Host *shost = iscsi_session_to_shost(session); |
448 | struct iscsi_host *ihost = shost->shost_data; | 446 | struct iscsi_cls_host *ihost = shost->shost_data; |
449 | 447 | ||
450 | /* Prevent new scans and make sure scanning is not in progress */ | 448 | /* Prevent new scans and make sure scanning is not in progress */ |
451 | mutex_lock(&ihost->mutex); | 449 | mutex_lock(&ihost->mutex); |
@@ -463,7 +461,7 @@ static void __iscsi_unbind_session(struct work_struct *work) | |||
463 | static int iscsi_unbind_session(struct iscsi_cls_session *session) | 461 | static int iscsi_unbind_session(struct iscsi_cls_session *session) |
464 | { | 462 | { |
465 | struct Scsi_Host *shost = iscsi_session_to_shost(session); | 463 | struct Scsi_Host *shost = iscsi_session_to_shost(session); |
466 | struct iscsi_host *ihost = shost->shost_data; | 464 | struct iscsi_cls_host *ihost = shost->shost_data; |
467 | 465 | ||
468 | return queue_work(ihost->scan_workq, &session->unbind_work); | 466 | return queue_work(ihost->scan_workq, &session->unbind_work); |
469 | } | 467 | } |
@@ -505,7 +503,7 @@ EXPORT_SYMBOL_GPL(iscsi_alloc_session); | |||
505 | int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id) | 503 | int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id) |
506 | { | 504 | { |
507 | struct Scsi_Host *shost = iscsi_session_to_shost(session); | 505 | struct Scsi_Host *shost = iscsi_session_to_shost(session); |
508 | struct iscsi_host *ihost; | 506 | struct iscsi_cls_host *ihost; |
509 | unsigned long flags; | 507 | unsigned long flags; |
510 | int err; | 508 | int err; |
511 | 509 | ||
@@ -591,7 +589,7 @@ static int iscsi_iter_destroy_conn_fn(struct device *dev, void *data) | |||
591 | void iscsi_remove_session(struct iscsi_cls_session *session) | 589 | void iscsi_remove_session(struct iscsi_cls_session *session) |
592 | { | 590 | { |
593 | struct Scsi_Host *shost = iscsi_session_to_shost(session); | 591 | struct Scsi_Host *shost = iscsi_session_to_shost(session); |
594 | struct iscsi_host *ihost = shost->shost_data; | 592 | struct iscsi_cls_host *ihost = shost->shost_data; |
595 | unsigned long flags; | 593 | unsigned long flags; |
596 | int err; | 594 | int err; |
597 | 595 | ||
@@ -1619,7 +1617,7 @@ iscsi_register_transport(struct iscsi_transport *tt) | |||
1619 | priv->t.host_attrs.ac.attrs = &priv->host_attrs[0]; | 1617 | priv->t.host_attrs.ac.attrs = &priv->host_attrs[0]; |
1620 | priv->t.host_attrs.ac.class = &iscsi_host_class.class; | 1618 | priv->t.host_attrs.ac.class = &iscsi_host_class.class; |
1621 | priv->t.host_attrs.ac.match = iscsi_host_match; | 1619 | priv->t.host_attrs.ac.match = iscsi_host_match; |
1622 | priv->t.host_size = sizeof(struct iscsi_host); | 1620 | priv->t.host_size = sizeof(struct iscsi_cls_host); |
1623 | transport_container_register(&priv->t.host_attrs); | 1621 | transport_container_register(&priv->t.host_attrs); |
1624 | 1622 | ||
1625 | SETUP_HOST_RD_ATTR(netdev, ISCSI_HOST_NETDEV_NAME); | 1623 | SETUP_HOST_RD_ATTR(netdev, ISCSI_HOST_NETDEV_NAME); |