Whamcloud - gitweb
LU-7340 mdd: changelogs garbage collection
[fs/lustre-release.git] / lustre / include / lustre_log.h
index d31a1d1..e259ed3 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2015, Intel Corporation.
+ * Copyright (c) 2012, 2016, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -52,9 +52,9 @@
  */
 
 #include <obd_class.h>
-#include <lustre/lustre_idl.h>
 #include <dt_object.h>
-#include <lustre_log_user.h>
+#include <uapi/linux/lustre/lustre_idl.h>
+#include <uapi/linux/lustre/lustre_log_user.h>
 
 #define LOG_NAME_LIMIT(logname, name)                   \
         snprintf(logname, sizeof(logname), "LOGS/%s", name)
@@ -160,12 +160,10 @@ int llog_cat_process_or_fork(const struct lu_env *env,
 int llog_cat_process(const struct lu_env *env, struct llog_handle *cat_llh,
                     llog_cb_t cb, void *data, int startcat, int startidx);
 __u64 llog_cat_size(const struct lu_env *env, struct llog_handle *cat_llh);
+__u32 llog_cat_free_space(struct llog_handle *cat_llh);
 int llog_cat_reverse_process(const struct lu_env *env,
                             struct llog_handle *cat_llh, llog_cb_t cb,
                             void *data);
-int llog_cat_init_and_process(const struct lu_env *env,
-                             struct llog_handle *llh);
-
 /* llog_obd.c */
 int llog_setup(const struct lu_env *env, struct obd_device *obd,
               struct obd_llog_group *olg, int index,
@@ -276,8 +274,6 @@ struct llog_handle {
        int                      lgh_last_idx;
        int                      lgh_cur_idx; /* used during llog_process */
        __u64                    lgh_cur_offset; /* used during llog_process */
-       /* used during llog_osd_write_rec */
-       __u64                    lgh_write_offset;
        struct llog_ctxt        *lgh_ctxt;
        union {
                struct plain_handle_data         phd;
@@ -288,6 +284,7 @@ struct llog_handle {
        struct llog_operations  *lgh_logops;
        atomic_t                 lgh_refcount;
 
+       int                     lgh_max_size;
        __u32                   lgh_stale:1;
 };