int llog_obd_add(const struct lu_env *env, struct llog_ctxt *ctxt, struct llog_rec_hdr *rec, struct lov_stripe_md *lsm, struct llog_cookie *logcookies, int numcookies) { int raised, rc; ENTRY; if (!ctxt) { CERROR("No ctxt\n"); RETURN(-ENODEV); } if (ctxt->loc_flags & LLOG_CTXT_FLAG_UNINITIALIZED) RETURN(-ENXIO); CTXT_CHECK_OP(ctxt, obd_add, -EOPNOTSUPP); raised = cfs_cap_raised(CFS_CAP_SYS_RESOURCE); if (!raised) cfs_cap_raise(CFS_CAP_SYS_RESOURCE); rc = CTXTP(ctxt, obd_add)(env, ctxt, rec, lsm, logcookies, numcookies); if (!raised) cfs_cap_lower(CFS_CAP_SYS_RESOURCE); RETURN(rc); }
int llog_cancel(const struct lu_env *env, struct llog_ctxt *ctxt, struct lov_stripe_md *lsm, int count, struct llog_cookie *cookies, int flags) { int rc; if (!ctxt) { CERROR("No ctxt\n"); return -ENODEV; } CTXT_CHECK_OP(ctxt, cancel, -EOPNOTSUPP); rc = CTXTP(ctxt, cancel)(env, ctxt, lsm, count, cookies, flags); return rc; }
int llog_cancel(const struct lu_env *env, struct llog_ctxt *ctxt, struct llog_cookie *cookies, int flags) { int rc; ENTRY; if (!ctxt) { CERROR("No ctxt\n"); RETURN(-ENODEV); } CTXT_CHECK_OP(ctxt, cancel, -EOPNOTSUPP); rc = CTXTP(ctxt, cancel)(env, ctxt, cookies, flags); RETURN(rc); }