int __llog_ctxt_put(const struct lu_env *env, struct llog_ctxt *ctxt);
int llog_cleanup(const struct lu_env *env, struct llog_ctxt *);
int llog_sync(struct llog_ctxt *ctxt, struct obd_export *exp, int flags);
-int llog_cancel(const struct lu_env *env, struct llog_ctxt *ctxt,
- struct llog_cookie *cookies, int flags);
/* llog_ioctl.c */
struct obd_ioctl_data;
int (*lop_sync)(struct llog_ctxt *ctxt, struct obd_export *exp,
int flags);
int (*lop_cleanup)(const struct lu_env *env, struct llog_ctxt *ctxt);
- int (*lop_cancel)(const struct lu_env *env, struct llog_ctxt *ctxt,
- struct llog_cookie *cookies, int flags);
int (*lop_connect)(struct llog_ctxt *ctxt, struct llog_logid *logid,
struct llog_gen *gen, struct obd_uuid *uuid);
/**
static int llog_changelog_cancel(const struct lu_env *env,
struct llog_ctxt *ctxt,
- struct llog_cookie *cookies, int flags)
+ long long endrec)
{
struct llog_handle *cathandle = ctxt->loc_handle;
int rc;
LASSERT(cathandle->lgh_hdr->llh_flags & LLOG_F_IS_CAT);
rc = llog_cat_process(env, cathandle, llog_changelog_cancel_cb,
- (void *)cookies, 0, 0);
+ &endrec, 0, 0);
if (rc >= 0)
/* 0 or 1 means we're done */
rc = 0;
changed since the last purge) */
mdd->mdd_cl.mc_starttime = ktime_get();
- rc = llog_cancel(env, ctxt, (struct llog_cookie *)&endrec, 0);
+ rc = llog_changelog_cancel(env, ctxt, endrec);
out:
llog_ctxt_put(ctxt);
return rc;
return rc;
changelog_orig_logops = llog_osd_ops;
- changelog_orig_logops.lop_cancel = llog_changelog_cancel;
changelog_orig_logops.lop_add = llog_cat_add_rec;
changelog_orig_logops.lop_declare_add = llog_cat_declare_add_rec;
}
EXPORT_SYMBOL(llog_sync);
-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);
- }
-
- if (!ctxt->loc_obd->obd_type || !(ctxt)->loc_logops->lop_cancel) {
- CERROR("%s: no lop_cancel operation\n",
- ctxt->loc_obd->obd_name);
- RETURN(-EOPNOTSUPP);
- }
-
- rc = ctxt->loc_logops->lop_cancel(env, ctxt, cookies, flags);
- RETURN(rc);
-}
-EXPORT_SYMBOL(llog_cancel);
-
/* context key constructor/destructor: llog_key_init, llog_key_fini */
LU_KEY_INIT_FINI(llog, struct llog_thread_info);
/* context key: llog_thread_key */