On 25/10/2013 18:56, Mike Christie wrote:
On 10/24/2013 08:56 AM, Shlomo Pongratz wrote:
>diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
>index 6ac9e17..783f031 100644
>--- a/include/scsi/libiscsi.h
>+++ b/include/scsi/libiscsi.h
>@@ -326,12 +326,15 @@ struct iscsi_session {
>    struct iscsi_transport  *tt;
>    struct Scsi_Host        *host;
>    struct iscsi_conn       *leadconn;      /* leading connection */
>-   spinlock_t              lock;           /* protects session state, *
>-                                            * sequence numbers,       *
>+   spinlock_t              frwd_lock;      /* protects session state, *
>+                                            * cmdsn, queued_cmdsn     *
>                                             * session resources:      *
>-                                            * - cmdpool,              *
>+                                            * - cmdpool kfifo_out ,   *
>                                             * - mgmtpool,             *
>                                             * - r2tpool               */
>+   spinlock_t              back_lock;      /* protects cmdsn_exp      *
>+                                            * cmdsn_max,              *
>+                                            * cmdpool kfifo_in        */
>    int                     state;          /* session state           */
>    int                     age;            /* counts session re-opens */
>
In iscsi_eh_abort we will call fail_scsi_task with the frwd lock held.
fail_scsi_task then grabs the back lock.

Could you add a comment above about that locking ordering needing to be
followed so someone that has not reviewed the code does not add some
code that does the reverse?

OK, we will do that, add a sentence in the header file as you asked.



Just add that comment to the next version and send that next version to
linux-scsi and James. I will add my acked by on the list so James can
see it and pick it up.

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to