Print this page
3866 panic in idm module
3867 stmfCreateLu failed: GUID_IN_USE
3868 iscsi target not accepting any new connections
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed by: Jeremy Jones <jeremy@delphix.com>
Reviewed by: Eric Diven <eric.diven@delphix.com>

@@ -6107,20 +6107,21 @@
         struct timeval32 timestamp32;
         uint32_t *t = (uint32_t *)&timestamp32;
         struct ether_addr mac;
         uint8_t *e = (uint8_t *)&mac;
         int hid = (int)host_id;
+        uint16_t gen_number;
 
         if (company_id == COMPANY_ID_NONE)
                 company_id = COMPANY_ID_SUN;
 
         if (lu_id->ident_length != 0x10)
                 return (STMF_INVALID_ARG);
 
         p = (uint8_t *)lu_id;
 
-        atomic_add_16(&stmf_lu_id_gen_number, 1);
+        gen_number = atomic_add_16_nv(&stmf_lu_id_gen_number, 1);
 
         p[0] = 0xf1; p[1] = 3; p[2] = 0; p[3] = 0x10;
         p[4] = ((company_id >> 20) & 0xf) | 0x60;
         p[5] = (company_id >> 12) & 0xff;
         p[6] = (company_id >> 4) & 0xff;

@@ -6137,12 +6138,12 @@
         }
         bcopy(e, p+8, 6);
         uniqtime32(&timestamp32);
         *t = BE_32(*t);
         bcopy(t, p+14, 4);
-        p[18] = (stmf_lu_id_gen_number >> 8) & 0xff;
-        p[19] = stmf_lu_id_gen_number & 0xff;
+        p[18] = (gen_number >> 8) & 0xff;
+        p[19] = gen_number & 0xff;
 
         return (STMF_SUCCESS);
 }
 
 /*