Whamcloud - gitweb
LU-1330 obdclass: add obd_target.h
[fs/lustre-release.git] / lustre / include / lustre_log.h
index 2419161..e4c4bcf 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -98,21 +98,31 @@ static inline void logid_to_fid(struct llog_logid *id, struct lu_fid *fid)
         * logid's by non-zero ogen (inode generation) and convert them
         * into IGIF */
        if (id->lgl_ogen == 0) {
-               fid->f_seq = id->lgl_oseq;
-               fid->f_oid = id->lgl_oid;
+               fid->f_seq = id->lgl_oi.oi.oi_seq;
+               fid->f_oid = id->lgl_oi.oi.oi_id;
                fid->f_ver = 0;
        } else {
-               lu_igif_build(fid, id->lgl_oid, id->lgl_ogen);
+               lu_igif_build(fid, id->lgl_oi.oi.oi_id, id->lgl_ogen);
        }
 }
 
 static inline void fid_to_logid(struct lu_fid *fid, struct llog_logid *id)
 {
-       id->lgl_oseq = fid->f_seq;
-       id->lgl_oid = fid->f_oid;
+       id->lgl_oi.oi.oi_seq = fid->f_seq;
+       id->lgl_oi.oi.oi_id = fid->f_oid;
        id->lgl_ogen = 0;
 }
 
+static inline void logid_set_id(struct llog_logid *log_id, __u64 id)
+{
+       log_id->lgl_oi.oi.oi_id = id;
+}
+
+static inline __u64 logid_id(struct llog_logid *log_id)
+{
+       return log_id->lgl_oi.oi.oi_id;
+}
+
 struct llog_handle;
 
 /* llog.c  -  general API */