return 0;
}
}
+EXPORT_SYMBOL(lustre_msg_get_last_xid);
+
+__u16 lustre_msg_get_tag(struct lustre_msg *msg)
+{
+ switch (msg->lm_magic) {
+ case LUSTRE_MSG_MAGIC_V2: {
+ struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+ if (!pb) {
+ CERROR("invalid msg %p: no ptlrpc body!\n", msg);
+ return 0;
+ }
+ return pb->pb_tag;
+ }
+ default:
+ CERROR("incorrect message magic: %08x\n", msg->lm_magic);
+ return 0;
+ }
+}
+EXPORT_SYMBOL(lustre_msg_get_tag);
__u64 lustre_msg_get_last_committed(struct lustre_msg *msg)
{
LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
}
}
+EXPORT_SYMBOL(lustre_msg_set_last_xid);
+
+void lustre_msg_set_tag(struct lustre_msg *msg, __u16 tag)
+{
+ switch (msg->lm_magic) {
+ case LUSTRE_MSG_MAGIC_V2: {
+ struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+ LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
+ pb->pb_tag = tag;
+ return;
+ }
+ default:
+ LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
+ }
+}
+EXPORT_SYMBOL(lustre_msg_set_tag);
void lustre_msg_set_last_committed(struct lustre_msg *msg, __u64 last_committed)
{
__swab32s (&b->pb_opc);
__swab32s (&b->pb_status);
__swab64s (&b->pb_last_xid);
- __swab64s (&b->pb_last_seen);
+ __swab16s (&b->pb_tag);
__swab64s (&b->pb_last_committed);
__swab64s (&b->pb_transno);
__swab32s (&b->pb_flags);
__swab64s (&b->pb_pre_versions[1]);
__swab64s (&b->pb_pre_versions[2]);
__swab64s (&b->pb_pre_versions[3]);
- CLASSERT(offsetof(typeof(*b), pb_padding) != 0);
+ CLASSERT(offsetof(typeof(*b), pb_padding0) != 0);
+ CLASSERT(offsetof(typeof(*b), pb_padding1) != 0);
+ CLASSERT(offsetof(typeof(*b), pb_padding) != 0);
/* While we need to maintain compatibility between
* clients and servers without ptlrpc_body_v2 (< 2.3)
* do not swab any fields beyond pb_jobid, as we are
__swab32s(&ocd->ocd_max_easize);
if (ocd->ocd_connect_flags & OBD_CONNECT_MAXBYTES)
__swab64s(&ocd->ocd_maxbytes);
+ if (ocd->ocd_connect_flags & OBD_CONNECT_MULTIMODRPCS)
+ __swab16s(&ocd->ocd_maxmodrpcs);
+ CLASSERT(offsetof(typeof(*ocd), padding0) != 0);
CLASSERT(offsetof(typeof(*ocd), padding1) != 0);
CLASSERT(offsetof(typeof(*ocd), padding2) != 0);
CLASSERT(offsetof(typeof(*ocd), padding3) != 0);
__swab16s(&lmm->lmm_layout_gen);
EXIT;
}
+EXPORT_SYMBOL(lustre_swab_lov_mds_md);
void lustre_swab_lov_user_md_objects(struct lov_user_ost_data *lod,
int stripe_count)