lkml.org 
[lkml]   [2022]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectAntw: [EXT] Re: [PATCH v2] scsi: iscsi: Fix multiple iscsi session unbind event sent to userspace
>>> Mike Christie <michael.christie@oracle.com> schrieb am 20.04.2022 um 18:28 in
Nachricht <938bca13-2dcc-24c0-51b5-26f7e7238776@oracle.com>:

...
>
>> diff --git a/include/scsi/scsi_transport_iscsi.h
> b/include/scsi/scsi_transport_iscsi.h
>> index 9acb8422f680..877632c25e56 100644
>> --- a/include/scsi/scsi_transport_iscsi.h
>> +++ b/include/scsi/scsi_transport_iscsi.h
>> @@ -256,6 +256,7 @@ struct iscsi_cls_session {
>> struct workqueue_struct *workq;
>>
>> unsigned int target_id;
>> + int target_unbound; /* make sure unbind session only once */
>
>
> We don't need the comment since the code using this is so simple
> and the name of the variable tells us what it's for.

Actually I think a comment may be worth it, but it should say what the variable expresses, not what it is used for
(the use may change, but hopefully not the semantics (unless updated globally)).
So maybe: /* is target unbound? */
(the question mnark emphasizing that it is a boolean type of variable)
But still, if the name is mostly identical to the comment, one may leave out the comment.

Regards,
Ulrich

>
>
>> bool ida_used;
>>
>> /*
>
> --
> You received this message because you are subscribed to the Google Groups
> "open-iscsi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to open-iscsi+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/open-iscsi/938bca13-2dcc-24c0-51b5-26f7e723
> 8776%40oracle.com.




\
 
 \ /
  Last update: 2022-04-21 08:22    [W:0.041 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site