X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Finclude%2Flustre_log.h;h=708d7c89ab222c7087bd99d8d2859c865f262579;hp=e4c4bcf9d2339351febcfec6b0e84227ca1020a4;hb=3e38436dc09097429e1ca1fbfa3ef4981e124715;hpb=93a6346f8b73f68cb5bc02a3c826ac0e5b4c236e diff --git a/lustre/include/lustre_log.h b/lustre/include/lustre_log.h index e4c4bcf..708d7c8 100644 --- a/lustre/include/lustre_log.h +++ b/lustre/include/lustre_log.h @@ -144,7 +144,11 @@ int llog_open(const struct lu_env *env, struct llog_ctxt *ctxt, struct llog_handle **lgh, struct llog_logid *logid, char *name, enum llog_open_param open_param); int llog_close(const struct lu_env *env, struct llog_handle *cathandle); -int llog_get_size(struct llog_handle *loghandle); +int llog_is_empty(const struct lu_env *env, struct llog_ctxt *ctxt, + char *name); +int llog_backup(const struct lu_env *env, struct obd_device *obd, + struct llog_ctxt *ctxt, struct llog_ctxt *bak_ctxt, + char *name, char *backup); /* llog_process flags */ #define LLOG_FLAG_NODEAMON 0x0001 @@ -390,6 +394,13 @@ static inline int llog_data_len(int len) return cfs_size_round(len); } +static inline int llog_get_size(struct llog_handle *loghandle) +{ + if (loghandle && loghandle->lgh_hdr) + return loghandle->lgh_hdr->llh_count; + return 0; +} + static inline struct llog_ctxt *llog_ctxt_get(struct llog_ctxt *ctxt) { cfs_atomic_inc(&ctxt->loc_refcount);