Whamcloud - gitweb
LU-10698 obdclass: allow specifying complex jobids
[fs/lustre-release.git] / lustre / ptlrpc / pack_generic.c
index ce07f42..a66b6d4 100644 (file)
@@ -185,6 +185,7 @@ __u32 lustre_packed_msg_size(struct lustre_msg *msg)
                 return 0;
         }
 }
+EXPORT_SYMBOL(lustre_packed_msg_size);
 
 void lustre_init_msg_v2(struct lustre_msg_v2 *msg, int count, __u32 *lens,
                         char **bufs)
@@ -1512,9 +1513,9 @@ void lustre_msg_set_jobid(struct lustre_msg *msg, char *jobid)
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
 
                if (jobid != NULL)
-                       memcpy(pb->pb_jobid, jobid, LUSTRE_JOBID_SIZE);
+                       memcpy(pb->pb_jobid, jobid, sizeof(pb->pb_jobid));
                else if (pb->pb_jobid[0] == '\0')
-                       lustre_get_jobid(pb->pb_jobid);
+                       lustre_get_jobid(pb->pb_jobid, sizeof(pb->pb_jobid));
                return;
        }
        default:
@@ -1870,7 +1871,7 @@ void lustre_swab_mdt_body (struct mdt_body *b)
        __swab64s(&b->mbo_atime);
        __swab64s(&b->mbo_ctime);
        __swab64s(&b->mbo_blocks);
-       __swab64s(&b->mbo_ioepoch);
+       __swab64s(&b->mbo_version);
        __swab64s(&b->mbo_t_state);
        __swab32s(&b->mbo_fsuid);
        __swab32s(&b->mbo_fsgid);
@@ -1881,7 +1882,7 @@ void lustre_swab_mdt_body (struct mdt_body *b)
        __swab32s(&b->mbo_flags);
        __swab32s(&b->mbo_rdev);
        __swab32s(&b->mbo_nlink);
-       CLASSERT(offsetof(typeof(*b), mbo_unused2) != 0);
+       __swab32s(&b->mbo_layout_gen);
        __swab32s(&b->mbo_suppgid);
        __swab32s(&b->mbo_eadatasize);
        __swab32s(&b->mbo_aclsize);