lock_res(res);
res_lvb = res->lr_lvb_data;
- if (lvb)
- *lvb = *res_lvb;
-
- if (mb) {
- mb->mbo_dom_size = res_lvb->lvb_size;
- mb->mbo_dom_blocks = res_lvb->lvb_blocks;
- mb->mbo_mtime = res_lvb->lvb_mtime;
- mb->mbo_ctime = res_lvb->lvb_ctime;
- mb->mbo_atime = res_lvb->lvb_atime;
- mb->mbo_valid |= OBD_MD_FLATIME | OBD_MD_FLCTIME |
- OBD_MD_FLMTIME | OBD_MD_DOM_SIZE;
+ if (res_lvb) {
+ if (lvb)
+ *lvb = *res_lvb;
+
+ if (mb) {
+ mb->mbo_dom_size = res_lvb->lvb_size;
+ mb->mbo_dom_blocks = res_lvb->lvb_blocks;
+ mb->mbo_mtime = res_lvb->lvb_mtime;
+ mb->mbo_ctime = res_lvb->lvb_ctime;
+ mb->mbo_atime = res_lvb->lvb_atime;
+ mb->mbo_valid |= OBD_MD_FLATIME | OBD_MD_FLCTIME |
+ OBD_MD_FLMTIME | OBD_MD_DOM_SIZE;
+ }
+ CDEBUG(D_DLMTRACE, "size %llu\n", res_lvb->lvb_size);
}
- CDEBUG(D_DLMTRACE, "size %llu\n", res_lvb->lvb_size);
unlock_res(res);
}
ENTRY;
/* Before going further let's check that OBD and export are healthy.
+ * The condition matches one in ptlrpc_send_reply()
*/
- if (exp != NULL &&
- (exp->exp_disconnected || exp->exp_failed ||
- exp->exp_obd->obd_stopping)) {
- CDEBUG(D_INFO, "Skip LVB update, export is %s, obd is %s\n",
- exp->exp_failed ? "failed" : "disconnected",
- exp->exp_obd->obd_stopping ? "stopping" : "OK");
+ if (exp && exp->exp_obd && exp->exp_obd->obd_fail) {
+ CDEBUG(D_INFO, "Skip LVB update, obd is failing over\n");
RETURN(0);
}