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
This patch has been checked in on the 3.3.x and master branches. Thanks for the patch!