if (l_has_lock(&ns->ns_lock) && time_after(jiffies, next_msg)) {
CERROR("namespace %s lock held illegally; tell phil\n",
ns->ns_name);
-#if (LUSTRE_KERNEL_VERSION >= 30)
- CERROR(portals_debug_dumpstack());
-#endif
next_msg = jiffies + 60 * HZ;
}
}
LASSERT(logcookies && numcookies >= lsm->lsm_stripe_count);
+ /* We need this to serialize llog records between parallel unlinks so
+ * we can replay llog records in strict transno and llog order. If
+ * and when we want to make this more scalable we need to lock and
+ * write records in strictly ost_idx order not lsm order. Consider
+ * file 1 on ost_idx [1, 2, 3, 4] and file 2 on ost_idx [3, 4, 1, 2] */
+ down(&lov->lov_llog_sem);
for (i = 0,loi = lsm->lsm_oinfo; i < lsm->lsm_stripe_count; i++,loi++) {
struct obd_device *child =
lov->tgts[loi->loi_ost_idx].ltd_exp->exp_obd;
numcookies - rc, NULL,
lock != NULL ? lock + rc : NULL, lock_count);
}
+ up(&lov->lov_llog_sem);
OBD_FREE(lur, sizeof(*lur));
RETURN(rc);
CDEBUG(D_CONFIG, "tgts: %p bufsize: 0x%x\n", lov->tgts, lov->bufsize);
lov->desc = *desc;
spin_lock_init(&lov->lov_lock);
+ sema_init(&lov->lov_llog_sem, 1);
RETURN(0);
}