Menu

#27 scst_copy_mgr provides lun number more than SCST_MAX_LUN

1.0
closed
nobody
None
2019-09-06
2019-08-30
No

Hello guys,

I am able to reproduce issue related to bug in scst_copy_mgr logic.
I use scst on servers which perform thousands of show/hide iscsi volumes operation per day. SCST stops working once I get lun numbers more > scst_copy_mgr

I found issue in scst_cm_dev_register. it looks like scst_cm_next_lun should be reset to zero if it reaches SCST_MAX_LUN.

this patch fixes issue I described:

Index: src/scst_copy_mgr.c
===================================================================
--- src/scst_copy_mgr.c (revision 7273)
+++ src/scst_copy_mgr.c (working copy)
@@ -2587,8 +2587,10 @@
                add_lun = true;
                while (1) {
                        lun = scst_cm_next_lun++;

-                       if (lun == SCST_MAX_LUN)
+                       if (lun == SCST_MAX_LUN) {
+                               scst_cm_next_lun = 0;
                                continue;
+                        }
                        if (scst_cm_is_lun_free(lun))
                                break;

Thank you,
Alexander Sinditskiy

Discussion

  • Bart Van Assche

    Bart Van Assche - 2019-09-06
     
  • Bart Van Assche

    Bart Van Assche - 2019-09-06

    This patch has been checked in on the 3.3.x and master branches. Thanks for the patch!

     
    👍
    1
  • Bart Van Assche

    Bart Van Assche - 2019-09-06
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB