ASSERTION(open_req->rq_transno != 0), because it tries to release
the failed open handle.
+Severity : normal
+Frequency : rare
+Bugzilla : 12556
+Description: Set cat log bitmap only after create log success.
+Details : in some rare cases, the cat log bitmap is set too early. and it
+ should be set only after create log success.
+
--------------------------------------------------------------------------------
2007-05-03 Cluster File Systems, Inc. <info@clusterfs.com>
#define OBD_FAIL_MDS_SETXATTR_WRITE 0x134
#define OBD_FAIL_MDS_FS_SETUP 0x135
#define OBD_FAIL_MDS_RESEND 0x136
+#define OBD_FAIL_MDS_LLOG_CREATE_FAILED 0x137
#define OBD_FAIL_OST 0x200
#define OBD_FAIL_OST_CONNECT_NET 0x201
if (llh->llh_cat_idx == index) {
CERROR("no free catalog slots for log...\n");
RETURN(ERR_PTR(-ENOSPC));
- } else {
- if (index == 0)
- index = 1;
- if (ext2_set_bit(index, llh->llh_bitmap)) {
- CERROR("argh, index %u already set in log bitmap?\n",
- index);
- LBUG(); /* should never happen */
- }
- cathandle->lgh_last_idx = index;
- llh->llh_count++;
- llh->llh_tail.lrt_index = index;
}
+ if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_MDS_LLOG_CREATE_FAILED))
+ RETURN(ERR_PTR(-ENOSPC));
+
rc = llog_create(cathandle->lgh_ctxt, &loghandle, NULL, NULL);
if (rc)
RETURN(ERR_PTR(rc));
-
+
rc = llog_init_handle(loghandle,
LLOG_F_IS_PLAIN | LLOG_F_ZAP_WHEN_EMPTY,
&cathandle->lgh_hdr->llh_tgtuuid);
if (rc)
GOTO(out_destroy, rc);
+ if (index == 0)
+ index = 1;
+ if (ext2_set_bit(index, llh->llh_bitmap)) {
+ CERROR("argh, index %u already set in log bitmap?\n",
+ index);
+ LBUG(); /* should never happen */
+ }
+ cathandle->lgh_last_idx = index;
+ llh->llh_count++;
+ llh->llh_tail.lrt_index = index;
CDEBUG(D_HA, "new recovery log "LPX64":%x for index %u of catalog "
LPX64"\n", loghandle->lgh_id.lgl_oid, loghandle->lgh_id.lgl_ogen,