The bug was introduced in previous commit causing
wrong catalog index to be set.
Test-Parameters: alwaysuploadlogs envdefinitions=SLOW=yes mdtfilesystemtype=ldiskfs mdsfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs clientdistro=el7 ossdistro=el6.6 mdsdistro=el6.6 mdtcount=1 testlist=performance-sanity
Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Iaa0747c5f504109f3a265c7cdda91ebe7ba83b4f
Reviewed-on: http://review.whamcloud.com/15841
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
if (llh->llh_cat_idx == (idx - 1)) {
llh->llh_cat_idx = idx;
- do {
+ while (idx != cathandle->lgh_last_idx) {
idx = (idx + 1) % bitmap_size;
if (!ext2_test_bit(idx, LLOG_HDR_BITMAP(llh))) {
/* update llh_cat_idx for each unset bit,
- * expecting the*/
+ * expecting the next one is set */
llh->llh_cat_idx = idx;
} else if (idx == 0) {
/* skip header bit */
+ llh->llh_cat_idx = 0;
continue;
} else {
/* the first index is found */
break;
}
- } while (idx != cathandle->lgh_last_idx);
+ }
CDEBUG(D_RPCTRACE, "Set catlog "DOSTID" first idx %u,"
" (last_idx %u)\n", POSTID(&cathandle->lgh_id.lgl_oi),