Whamcloud - gitweb
b=600245
authorpschwan <pschwan>
Wed, 11 Sep 2002 16:11:09 +0000 (16:11 +0000)
committerpschwan <pschwan>
Wed, 11 Sep 2002 16:11:09 +0000 (16:11 +0000)
This probably won't fix 600245, but it is related, and would have bitten us
once we grew to more than 32 clients with an ia32 MDS.

lustre/mds/mds_fs.c

index dce0ff0..51aa4b4 100644 (file)
@@ -63,8 +63,10 @@ int mds_client_add(struct mds_export_data *med, int cl_off)
                         LBUG();
                         goto repeat;
                 }
-                cl_off = word - last_rcvd_slots + bit;
+                cl_off = (word - last_rcvd_slots) * sizeof(unsigned long) + bit;
         } else {
+                /* test_and_set_bit can handle cl_off > sizeof(long), so there's
+                 * no need to frob it */
                 if (test_and_set_bit(cl_off, last_rcvd_slots)) {
                         CERROR("bit %d already set in bitmap - bad bad\n",
                                cl_off);