/* packing of MDS records */
void mdc_open_pack(struct lustre_msg *msg, int offset,
- struct mdc_op_data *op_data, __u32 mode, __u64 rdev,
- __u32 flags, const void *lmm, int lmmlen)
+ struct mdc_op_data *op_data, __u32 mode,
+ __u64 rdev, __u32 flags, const void *lmm,
+ int lmmlen)
{
struct mds_rec_create *rec;
char *tmp;
+
rec = lustre_msg_buf(msg, offset, sizeof (*rec));
/* XXX do something about time, uid, gid */
if (op_data != NULL)
rec->cr_id = op_data->id1;
memset(&rec->cr_replayid, 0, sizeof(rec->cr_replayid));
- rec->cr_mode = mode;
rec->cr_flags = mds_pack_open_flags(flags);
- rec->cr_rdev = rdev;
rec->cr_time = op_data->mod_time;
+ rec->cr_mode = mode;
+ rec->cr_rdev = rdev;
if (op_data->name) {
tmp = lustre_msg_buf(msg, offset + 1,
body->valid |= OBD_MD_FLFLAGS;
}
}
+
+/*
+ * these methods needed for saying higher levels that MDC does not pack/unpack
+ * any EAs. This is needed to have real abstraction and do not try to recognize
+ * what OBD type is to avoid calling these methods on it, as they may not be
+ * implemented.
+ *
+ * Sometimes pack/unpack calls happen to MDC too. This is for instance default
+ * striping info for directories and our goal here is to skip them with no
+ * errors or any complains.
+ */
+int mdc_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
+ struct lov_stripe_md *lsm)
+{
+ ENTRY;
+ RETURN(0);
+}
+
+int mdc_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
+ struct lov_mds_md *lmm, int lmm_size)
+{
+ ENTRY;
+ RETURN(0);
+}
+