Erez Zilber wrote:
> When a transport (e.g. iscsi_tcp, ib_iser) is unloaded, a notification
> must be sent to userspace. This will allow the userspace code to release
> all transport related resources.
> 
> Signed-off-by: Erez Zilber <[EMAIL PROTECTED]>

Erez, some tiny comments.


> ---
>  drivers/scsi/scsi_transport_iscsi.c |   30 ++++++++++++++++++++++++++++++
>  include/scsi/iscsi_if.h             |    7 ++++---
>  2 files changed, 34 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/scsi_transport_iscsi.c 
> b/drivers/scsi/scsi_transport_iscsi.c
> index cbd2b71..706c9b9 100644
> --- a/drivers/scsi/scsi_transport_iscsi.c
> +++ b/drivers/scsi/scsi_transport_iscsi.c
> @@ -1710,6 +1710,34 @@ free_priv:
>  }
>  EXPORT_SYMBOL_GPL(iscsi_register_transport);
>  
> +void iscsi_trans_error(struct iscsi_transport *tt)
> +{
> +     struct nlmsghdr *nlh;
> +     struct sk_buff *skb;
> +     struct iscsi_uevent *ev;
> +     int len = NLMSG_SPACE(sizeof(*ev));
> +     struct iscsi_internal *priv;
> +
> +     priv = iscsi_if_transport_lookup(tt);
> +     if (!priv)
> +             return;
> +
> +     skb = alloc_skb(len, GFP_ATOMIC);


Since we only do this on module unload we should use GFP_KERNEL here.



> +     if (!skb) {
> +             printk(KERN_ERR "iscsi: gracefully ignored transport error\n");
> +             return;
> +     }
> +
> +     nlh = __nlmsg_put(skb, priv->daemon_pid, 0, 0, (len - sizeof(*nlh)), 0);
> +     ev = NLMSG_DATA(nlh);
> +     ev->transport_handle = iscsi_handle(tt);
> +     ev->type = ISCSI_KEVENT_TRANS_ERROR;
> +
> +     iscsi_broadcast_skb(skb, GFP_ATOMIC);
> +

Use GFP_KERNEL here too.

> +     printk(KERN_INFO "iscsi: detected transport error\n");

Again, since this is only used on module unload delete the error message 
since module unload is not an error and the log message is only going to 
cause confusion.

Resend it and then let's send it to James with the other iscsi patches 
for 2.6.26. Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to