+ CDEBUG(D_RPCTRACE, "object "LPU64" is chown/chgrp\n", oid);
+
+ RETURN(rc);
+}
+
+int filter_recov_log_mds_ost_cb(struct llog_handle *llh,
+ struct llog_rec_hdr *rec, void *data)
+{
+ struct llog_ctxt *ctxt = llh->lgh_ctxt;
+ struct llog_cookie cookie;
+ int rc = 0;
+ ENTRY;
+
+ if (ctxt->loc_obd->obd_stopping)
+ RETURN(LLOG_PROC_BREAK);
+
+ if (rec == NULL) {
+ cfs_spin_lock(&ctxt->loc_obd->u.filter.fo_flags_lock);
+ ctxt->loc_obd->u.filter.fo_mds_ost_sync = 0;
+ cfs_spin_unlock(&ctxt->loc_obd->u.filter.fo_flags_lock);
+ RETURN(0);
+ }
+
+ if (!(llh->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN)) {
+ CERROR("log is not plain\n");
+ RETURN(-EINVAL);
+ }
+
+ OBD_FAIL_TIMEOUT(OBD_FAIL_OST_LLOG_RECOVERY_TIMEOUT, 30);
+ cookie.lgc_lgl = llh->lgh_id;
+ cookie.lgc_subsys = LLOG_MDS_OST_ORIG_CTXT;
+ cookie.lgc_index = rec->lrh_index;
+
+ switch (rec->lrh_type) {
+ case MDS_UNLINK_REC:
+ rc = filter_recov_log_unlink_cb(ctxt, rec, &cookie);
+ break;
+ case MDS_SETATTR_REC:
+ case MDS_SETATTR64_REC:
+ rc = filter_recov_log_setattr_cb(ctxt, rec, &cookie);
+ break;
+ case LLOG_GEN_REC: {
+ struct llog_gen_rec *lgr = (struct llog_gen_rec *)rec;
+ if (llog_gen_lt(lgr->lgr_gen, ctxt->loc_gen))
+ rc = 0;
+ else
+ rc = LLOG_PROC_BREAK;
+ CDEBUG(D_HA, "fetch generation log, send cookie\n");
+ llog_cancel(ctxt, NULL, 1, &cookie, 0);
+ RETURN(rc);
+ }
+ break;
+ default:
+ CERROR("log record type %08x unknown\n", rec->lrh_type);
+ RETURN(-EINVAL);
+ break;
+ }