Whamcloud - gitweb
LU-11016 obdclass: change JobID error into warning
[fs/lustre-release.git] / lustre / obdclass / llog_swab.c
index cd248cd..4ba4cea 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2015, Intel Corporation.
+ * Copyright (c) 2012, 2017, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -214,6 +214,7 @@ void lustre_swab_llog_rec(struct llog_rec_hdr *rec)
 
                 __swab32s(&cur->cur_id);
                 __swab64s(&cur->cur_endrec);
+               __swab32s(&cur->cur_time);
                tail = &cur->cur_tail;
                 break;
         }
@@ -249,9 +250,10 @@ void lustre_swab_llog_rec(struct llog_rec_hdr *rec)
 
                if (rec->lrh_len > sizeof(struct llog_setattr64_rec)) {
                        struct llog_setattr64_rec_v2 *lsr2 =
-                       (struct llog_setattr64_rec_v2 *)rec;
+                               (struct llog_setattr64_rec_v2 *)rec;
 
                        __swab32s(&lsr2->lsr_projid);
+                       __swab32s(&lsr2->lsr_layout_version);
                        tail = &lsr2->lsr_tail;
                } else {
                        tail = &lsr->lsr_tail;
@@ -353,13 +355,14 @@ void lustre_swab_llog_hdr (struct llog_log_hdr *h)
 }
 EXPORT_SYMBOL(lustre_swab_llog_hdr);
 
-static void print_lustre_cfg(struct lustre_cfg *lcfg)
+void print_lustre_cfg(struct lustre_cfg *lcfg)
 {
         int i;
         ENTRY;
 
         if (!(libcfs_debug & D_OTHER)) /* don't loop on nothing */
                 return;
+
         CDEBUG(D_OTHER, "lustre_cfg: %p\n", lcfg);
         CDEBUG(D_OTHER, "\tlcfg->lcfg_version: %#x\n", lcfg->lcfg_version);
 
@@ -368,13 +371,17 @@ static void print_lustre_cfg(struct lustre_cfg *lcfg)
         CDEBUG(D_OTHER, "\tlcfg->lcfg_flags: %#x\n", lcfg->lcfg_flags);
         CDEBUG(D_OTHER, "\tlcfg->lcfg_nid: %s\n", libcfs_nid2str(lcfg->lcfg_nid));
 
-        CDEBUG(D_OTHER, "\tlcfg->lcfg_bufcount: %d\n", lcfg->lcfg_bufcount);
-        if (lcfg->lcfg_bufcount < LUSTRE_CFG_MAX_BUFCOUNT)
-                for (i = 0; i < lcfg->lcfg_bufcount; i++)
-                        CDEBUG(D_OTHER, "\tlcfg->lcfg_buflens[%d]: %d\n",
-                               i, lcfg->lcfg_buflens[i]);
+       CDEBUG(D_OTHER, "\tlcfg->lcfg_bufcount: %d\n", lcfg->lcfg_bufcount);
+       if (lcfg->lcfg_bufcount < LUSTRE_CFG_MAX_BUFCOUNT)
+               for (i = 0; i < lcfg->lcfg_bufcount; i++) {
+                       CDEBUG(D_OTHER, "\tlcfg->lcfg_buflens[%d]: %d %s\n",
+                              i, lcfg->lcfg_buflens[i],
+                              lustre_cfg_string(lcfg, i));
+               }
+
         EXIT;
 }
+EXPORT_SYMBOL(print_lustre_cfg);
 
 void lustre_swab_lustre_cfg(struct lustre_cfg *lcfg)
 {