};
extern void lustre_hsm_swab(struct hsm_attrs *attrs);
-struct ost_id {
- obd_id oi_id;
- obd_seq oi_seq;
-};
-
static inline void ostid_cpu_to_le(struct ost_id *src_oi,
struct ost_id *dst_oi)
{
#define lov_ost_data lov_ost_data_v1
struct lov_ost_data_v1 { /* per-stripe data structure (little-endian)*/
- __u64 l_object_id; /* OST object ID */
- __u64 l_object_seq; /* OST object seq number */
- __u32 l_ost_gen; /* generation of this l_ost_idx */
- __u32 l_ost_idx; /* OST index in LOV (lov_tgt_desc->tgts) */
+ struct ost_id l_ost_oi; /* OST object ID */
+ __u32 l_ost_gen; /* generation of this l_ost_idx */
+ __u32 l_ost_idx; /* OST index in LOV (lov_tgt_desc->tgts) */
};
#define lov_mds_md lov_mds_md_v1
struct lov_mds_md_v1 { /* LOV EA mds/wire data (little-endian) */
- __u32 lmm_magic; /* magic number = LOV_MAGIC_V1 */
- __u32 lmm_pattern; /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */
- __u64 lmm_object_id; /* LOV object ID */
- __u64 lmm_object_seq; /* LOV object seq number */
- __u32 lmm_stripe_size; /* size of stripe in bytes */
- /* lmm_stripe_count used to be __u32 */
- __u16 lmm_stripe_count; /* num stripes in use for this object */
- __u16 lmm_layout_gen; /* layout generation number */
- struct lov_ost_data_v1 lmm_objects[0]; /* per-stripe data */
+ __u32 lmm_magic; /* magic number = LOV_MAGIC_V1 */
+ __u32 lmm_pattern; /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */
+ struct ost_id lmm_oi; /* LOV object ID */
+ __u32 lmm_stripe_size; /* size of stripe in bytes */
+ /* lmm_stripe_count used to be __u32 */
+ __u16 lmm_stripe_count; /* num stripes in use for this object */
+ __u16 lmm_layout_gen; /* layout generation number */
+ struct lov_ost_data_v1 lmm_objects[0]; /* per-stripe data */
};
/* extern void lustre_swab_lov_mds_md(struct lov_mds_md *llm); */
#define XATTR_NAME_HSM "trusted.hsm"
#define XATTR_NAME_LFSCK_NAMESPACE "trusted.lfsck_namespace"
-
struct lov_mds_md_v3 { /* LOV EA mds/wire data (little-endian) */
- __u32 lmm_magic; /* magic number = LOV_MAGIC_V3 */
- __u32 lmm_pattern; /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */
- __u64 lmm_object_id; /* LOV object ID */
- __u64 lmm_object_seq; /* LOV object seq number */
- __u32 lmm_stripe_size; /* size of stripe in bytes */
- /* lmm_stripe_count used to be __u32 */
- __u16 lmm_stripe_count; /* num stripes in use for this object */
- __u16 lmm_layout_gen; /* layout generation number */
- char lmm_pool_name[LOV_MAXPOOLNAME]; /* must be 32bit aligned */
- struct lov_ost_data_v1 lmm_objects[0]; /* per-stripe data */
+ __u32 lmm_magic; /* magic number = LOV_MAGIC_V3 */
+ __u32 lmm_pattern; /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */
+ struct ost_id lmm_oi; /* LOV object ID */
+ __u32 lmm_stripe_size; /* size of stripe in bytes */
+ /* lmm_stripe_count used to be __u32 */
+ __u16 lmm_stripe_count; /* num stripes in use for this object */
+ __u16 lmm_layout_gen; /* layout generation number */
+ char lmm_pool_name[LOV_MAXPOOLNAME]; /* must be 32bit aligned */
+ struct lov_ost_data_v1 lmm_objects[0]; /* per-stripe data */
};
-
#define OBD_MD_FLID (0x00000001ULL) /* object ID */
#define OBD_MD_FLATIME (0x00000002ULL) /* access time */
#define OBD_MD_FLMTIME (0x00000004ULL) /* data modification time */
};
/**
+ * OST object IDentifier.
+ */
+struct ost_id {
+ __u64 oi_id;
+ __u64 oi_seq;
+};
+
+#define DOSTID LPX64":"LPU64
+#define POSTID(oi) (oi)->oi_seq, (oi)->oi_id
+
+/**
* File IDentifier.
*
* FID is a cluster-wide unique identifier of a file or an object (stripe).
#define lov_user_ost_data lov_user_ost_data_v1
struct lov_user_ost_data_v1 { /* per-stripe data structure */
- __u64 l_object_id; /* OST object ID */
- __u64 l_object_seq; /* OST object seq number */
- __u32 l_ost_gen; /* generation of this OST index */
- __u32 l_ost_idx; /* OST index in LOV */
+ struct ost_id l_ost_oi; /* OST object ID */
+ __u32 l_ost_gen; /* generation of this OST index */
+ __u32 l_ost_idx; /* OST index in LOV */
} __attribute__((packed));
+#define l_object_id l_ost_oi.oi_id
+#define l_object_seq l_ost_oi.oi_seq
#define lov_user_md lov_user_md_v1
struct lov_user_md_v1 { /* LOV EA user data (host-endian) */
__u32 lmm_magic; /* magic number = LOV_USER_MAGIC_V1 */
__u32 lmm_pattern; /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */
- __u64 lmm_object_id; /* LOV object ID */
- __u64 lmm_object_seq; /* LOV object seq */
+ struct ost_id lmm_oi; /* LOV object ID */
__u32 lmm_stripe_size; /* size of stripe in bytes */
__u16 lmm_stripe_count; /* num stripes in use for this object */
union {
struct lov_user_md_v3 { /* LOV EA user data (host-endian) */
__u32 lmm_magic; /* magic number = LOV_USER_MAGIC_V3 */
__u32 lmm_pattern; /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */
- __u64 lmm_object_id; /* LOV object ID */
- __u64 lmm_object_seq; /* LOV object seq */
+ struct ost_id lmm_oi; /* LOV object ID */
__u32 lmm_stripe_size; /* size of stripe in bytes */
__u16 lmm_stripe_count; /* num stripes in use for this object */
union {
__u64 lsm_maxbytes;
struct {
/* Public members. */
- struct ost_id lw_object_oid; /* lov object id/seq */
+ struct ost_id lw_object_oi; /* lov object id/seq */
/* LOV-private members start here -- only for use in lov/. */
__u32 lw_magic;
struct lov_oinfo *lsm_oinfo[0];
};
-#define lsm_object_oid lsm_wire.lw_object_oid
-#define lsm_object_id lsm_wire.lw_object_oid.oi_id
-#define lsm_object_seq lsm_wire.lw_object_oid.oi_seq
+#define lsm_oi lsm_wire.lw_object_oi
#define lsm_magic lsm_wire.lw_magic
#define lsm_layout_gen lsm_wire.lw_layout_gen
#define lsm_stripe_size lsm_wire.lw_stripe_size
int flag);
#endif
-#define POSTID LPU64":"LPX64
-
#endif
if (oa == NULL)
GOTO(out_free_memmd, rc = -ENOMEM);
- oa->o_id = lsm->lsm_object_id;
- oa->o_seq = lsm->lsm_object_seq;
+ oa->o_oi = lsm->lsm_oi;
oa->o_mode = body->mode & S_IFMT;
oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLGROUP;
obdo_set_parent_fid(oa, &llu_i2info(dir)->lli_fid);
}
}
- rc = obd_destroy(NULL, llu_i2obdexp(dir), oa, lsm, &oti, NULL, NULL);
- OBDO_FREE(oa);
- if (rc)
- CERROR("obd destroy objid 0x"LPX64" error %d\n",
- lsm->lsm_object_id, rc);
- out_free_memmd:
- obd_free_memmd(llu_i2obdexp(dir), &lsm);
- out:
- return rc;
+ rc = obd_destroy(NULL, llu_i2obdexp(dir), oa, lsm, &oti, NULL, NULL);
+ OBDO_FREE(oa);
+ if (rc)
+ CERROR("obd destroy objid "DOSTID" error %d\n",
+ POSTID(&lsm->lsm_oi), rc);
+out_free_memmd:
+ obd_free_memmd(llu_i2obdexp(dir), &lsm);
+out:
+ return rc;
}
/** Cliens updates SOM attributes on MDS: obd_getattr and md_setattr. */
oinfo.oi_md = lsm;
oinfo.oi_oa = obdo;
- oinfo.oi_oa->o_id = lsm->lsm_object_id;
- oinfo.oi_oa->o_seq = lsm->lsm_object_seq;
+ oinfo.oi_oa->o_oi = lsm->lsm_oi;
oinfo.oi_oa->o_mode = S_IFREG;
oinfo.oi_oa->o_ioepoch = ioepoch;
oinfo.oi_oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE |
close(fd);
if (opt_verbose) {
- printf("lmm_magic: 0x%08X\n", lum->lmm_magic);
- printf("lmm_object_id: "LPX64"\n", lum->lmm_object_id);
- printf("lmm_object_seq: "LPX64"\n", lum->lmm_object_seq);
- printf("lmm_stripe_count: %u\n", (int)lum->lmm_stripe_count);
- printf("lmm_stripe_size: %u\n", lum->lmm_stripe_size);
- printf("lmm_stripe_pattern: %x\n", lum->lmm_pattern);
+ printf("lmm_magic: 0x%08X\n", lum->lmm_magic);
+ printf("lmm_object_id: "LPX64"\n",
+ ostid_id(&lum->lmm_oi));
+ printf("lmm_object_seq: "LPX64"\n",
+ ostid_seq(&lum->lmm_oi));
+ printf("lmm_stripe_count: %u\n", (int)lum->lmm_stripe_count);
+ printf("lmm_stripe_size: %u\n", lum->lmm_stripe_size);
+ printf("lmm_stripe_pattern: %x\n", lum->lmm_pattern);
for (index = 0; index < lum->lmm_stripe_count; index++) {
lo = lum->lmm_objects + index;
}
close(fd);
- if (opt_verbose) {
- printf("lmm_magic: 0x%08X\n", lum->lmm_magic);
- printf("lmm_object_id: "LPX64"\n", lum->lmm_object_id);
- printf("lmm_object_seq: "LPX64"\n", lum->lmm_object_seq);
- printf("lmm_stripe_count: %u\n", (int)lum->lmm_stripe_count);
- printf("lmm_stripe_size: %u\n", lum->lmm_stripe_size);
- printf("lmm_stripe_pattern: %x\n", lum->lmm_pattern);
+ if (opt_verbose) {
+ printf("lmm_magic: 0x%08X\n", lum->lmm_magic);
+ printf("lmm_object_id: "LPX64"\n",
+ ostid_id(&lum->lmm_oi));
+ printf("lmm_object_seq: "LPX64"\n",
+ ostid_seq(&lum->lmm_oi));
+ printf("lmm_stripe_count: %u\n", (int)lum->lmm_stripe_count);
+ printf("lmm_stripe_size: %u\n", lum->lmm_stripe_size);
+ printf("lmm_stripe_pattern: %x\n", lum->lmm_pattern);
for (index = 0; index < lum->lmm_stripe_count; index++) {
lo = lum->lmm_objects + index;
oinfo.oi_md = lsm;
oinfo.oi_oa = obdo;
- oinfo.oi_oa->o_id = lsm->lsm_object_id;
- oinfo.oi_oa->o_seq = lsm->lsm_object_seq;
+ oinfo.oi_oa->o_oi = lsm->lsm_oi;
oinfo.oi_oa->o_mode = S_IFREG;
oinfo.oi_oa->o_ioepoch = ioepoch;
oinfo.oi_oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE |
capa, obdo, ioepoch, sync);
capa_put(capa);
if (rc == 0) {
+ struct ost_id *oi = lsm ? &lsm->lsm_oi : &obdo->o_oi;
+
obdo_refresh_inode(inode, obdo, obdo->o_valid);
- CDEBUG(D_INODE,
- "objid "LPX64" size %llu, blocks %llu, blksize %lu\n",
- lsm ? lsm->lsm_object_id : 0, i_size_read(inode),
+ CDEBUG(D_INODE, "objid "DOSTID" size %llu, blocks %llu,"
+ " blksize %lu\n", POSTID(oi), i_size_read(inode),
(unsigned long long)inode->i_blocks,
(unsigned long)ll_inode_blksize(inode));
}
!(fiemap->fm_flags & FIEMAP_FLAG_DEVICE_ORDER))
GOTO(out, rc = -EOPNOTSUPP);
- fm_key.oa.o_id = lsm->lsm_object_id;
- fm_key.oa.o_seq = lsm->lsm_object_seq;
+ fm_key.oa.o_oi = lsm->lsm_oi;
fm_key.oa.o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
obdo_from_inode(&fm_key.oa, inode, OBD_MD_FLSIZE);
RETURN(-ENOMEM);
}
oinfo.oi_md = lsm;
- oinfo.oi_oa->o_id = lsm->lsm_object_id;
- oinfo.oi_oa->o_seq = lsm->lsm_object_seq;
+ oinfo.oi_oa->o_oi = lsm->lsm_oi;
oinfo.oi_oa->o_flags = flags;
oinfo.oi_oa->o_valid = OBD_MD_FLID | OBD_MD_FLFLAGS |
OBD_MD_FLGROUP;
if (oa == NULL)
GOTO(out_free_memmd, rc = -ENOMEM);
- oa->o_id = lsm->lsm_object_id;
- oa->o_seq = lsm->lsm_object_seq;
+ oa->o_oi = lsm->lsm_oi;
oa->o_mode = body->mode & S_IFMT;
oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLGROUP;
GOTO(out_free_memmd, rc);
}
- rc = obd_destroy(NULL, ll_i2dtexp(dir), oa, lsm, &oti,
- ll_i2mdexp(dir), oc);
- capa_put(oc);
- if (rc)
- CERROR("obd destroy objid "LPX64" error %d\n",
- lsm->lsm_object_id, rc);
- out_free_memmd:
- obd_free_memmd(ll_i2dtexp(dir), &lsm);
+ rc = obd_destroy(NULL, ll_i2dtexp(dir), oa, lsm, &oti,
+ ll_i2mdexp(dir), oc);
+ capa_put(oc);
+ if (rc)
+ CERROR("obd destroy objid "DOSTID" error %d\n",
+ POSTID(&lsm->lsm_oi), rc);
+out_free_memmd:
+ obd_free_memmd(ll_i2dtexp(dir), &lsm);
OBDO_FREE(oa);
- out:
- return rc;
+out:
+ return rc;
}
/* ll_unlink_generic() doesn't update the inode with the new link count.
lmm->lmm_magic = cpu_to_le32(magic);
lmm->lmm_pattern = cpu_to_le32(LOV_PATTERN_RAID0);
- lmm->lmm_object_id = cpu_to_le64(fid_ver_oid(fid));
- lmm->lmm_object_seq = cpu_to_le64(fid_seq(fid));
+ fid_ostid_pack(fid, &lmm->lmm_oi);
+ ostid_cpu_to_le(&lmm->lmm_oi, &lmm->lmm_oi);
lmm->lmm_stripe_size = cpu_to_le32(lo->ldo_stripe_size);
lmm->lmm_stripe_count = cpu_to_le16(lo->ldo_stripenr);
lmm->lmm_layout_gen = 0;
rc = fid_ostid_pack(fid, &info->lti_ostid);
LASSERT(rc == 0);
- objs[i].l_object_id = cpu_to_le64(info->lti_ostid.oi_id);
- objs[i].l_object_seq = cpu_to_le64(info->lti_ostid.oi_seq);
+ ostid_cpu_to_le(&info->lti_ostid, &objs[i].l_ost_oi);
objs[i].l_ost_gen = cpu_to_le32(0);
rc = lod_fld_lookup(env, lod, fid, &index, LU_SEQ_RANGE_OST);
if (rc < 0) {
v3->lmm_magic = cpu_to_le32(LOV_MAGIC_V3);
v3->lmm_pattern = cpu_to_le32(LOV_PATTERN_RAID0);
- v3->lmm_object_id = 0;
- v3->lmm_object_seq = 0;
v3->lmm_stripe_size = cpu_to_le32(lo->ldo_def_stripe_size);
v3->lmm_stripe_count = cpu_to_le16(lo->ldo_def_stripenr);
v3->lmm_stripe_offset = cpu_to_le16(lo->ldo_def_stripe_offset);
RETURN(-ENOMEM);
for (i = 0; i < lo->ldo_stripenr; i++) {
- info->lti_ostid.oi_id = le64_to_cpu(objs[i].l_object_id);
- info->lti_ostid.oi_seq = le64_to_cpu(objs[i].l_object_seq);
+ ostid_le_to_cpu(&objs[i].l_ost_oi, &info->lti_ostid);
idx = le64_to_cpu(objs[i].l_ost_idx);
fid_ostid_unpack(&info->lti_fid, &info->lti_ostid, idx);
LASSERTF(fid_is_sane(&info->lti_fid), ""DFID" insane!\n",
rc = sizeof(struct lov_user_md_v1);
} else if (buf->lb_len >= sizeof(struct lov_user_md_v1)) {
lum->lmm_magic = LOV_USER_MAGIC_V1;
- lum->lmm_object_seq = FID_SEQ_LOV_DEFAULT;
+ lum->lmm_oi.oi_seq = FID_SEQ_LOV_DEFAULT;
lum->lmm_pattern = desc->ld_pattern;
lum->lmm_stripe_size = desc->ld_default_stripe_size;
lum->lmm_stripe_count = desc->ld_default_stripe_count;
v3->lmm_magic = cpu_to_le32(LOV_MAGIC_V3);
v3->lmm_pattern = cpu_to_le32(LOV_PATTERN_RAID0);
- v3->lmm_object_id = fid_oid(lu_object_fid(&dt->do_lu));
- v3->lmm_object_seq = fid_seq(lu_object_fid(&dt->do_lu));
+ fid_ostid_pack(lu_object_fid(&dt->do_lu), &v3->lmm_oi);
+ ostid_cpu_to_le(&v3->lmm_oi, &v3->lmm_oi);
v3->lmm_stripe_size = cpu_to_le32(lo->ldo_def_stripe_size);
v3->lmm_stripe_count = cpu_to_le32(lo->ldo_def_stripenr);
v3->lmm_stripe_offset = cpu_to_le16(lo->ldo_def_stripe_offset);
return -EINVAL;
}
- if (lmm->lmm_object_id == 0) {
- CERROR("zero object id\n");
- lov_dump_lmm(D_WARNING, lmm);
- return -EINVAL;
- }
+ if (ostid_id(&lmm->lmm_oi) == 0) {
+ CERROR("zero object id\n");
+ lov_dump_lmm(D_WARNING, lmm);
+ return -EINVAL;
+ }
if (lmm->lmm_pattern != cpu_to_le32(LOV_PATTERN_RAID0)) {
CERROR("bad striping pattern\n");
static void lsm_unpackmd_common(struct lov_stripe_md *lsm,
struct lov_mds_md *lmm)
{
- /*
- * This supposes lov_mds_md_v1/v3 first fields are
- * are the same
- */
- lsm->lsm_object_id = le64_to_cpu(lmm->lmm_object_id);
- lsm->lsm_object_seq = le64_to_cpu(lmm->lmm_object_seq);
- lsm->lsm_stripe_size = le32_to_cpu(lmm->lmm_stripe_size);
- lsm->lsm_pattern = le32_to_cpu(lmm->lmm_pattern);
- lsm->lsm_layout_gen = le16_to_cpu(lmm->lmm_layout_gen);
- lsm->lsm_pool_name[0] = '\0';
+ /*
+ * This supposes lov_mds_md_v1/v3 first fields are
+ * are the same
+ */
+ ostid_le_to_cpu(&lmm->lmm_oi, &lsm->lsm_oi);
+ lsm->lsm_stripe_size = le32_to_cpu(lmm->lmm_stripe_size);
+ lsm->lsm_pattern = le32_to_cpu(lmm->lmm_pattern);
+ lsm->lsm_layout_gen = le16_to_cpu(lmm->lmm_layout_gen);
+ lsm->lsm_pool_name[0] = '\0';
}
static void
lsm_unpackmd_common(lsm, lmm);
- for (i = 0; i < lsm->lsm_stripe_count; i++) {
- /* XXX LOV STACKING call down to osc_unpackmd() */
- loi = lsm->lsm_oinfo[i];
- loi->loi_id = le64_to_cpu(lmm->lmm_objects[i].l_object_id);
- loi->loi_seq = le64_to_cpu(lmm->lmm_objects[i].l_object_seq);
- loi->loi_ost_idx = le32_to_cpu(lmm->lmm_objects[i].l_ost_idx);
- loi->loi_ost_gen = le32_to_cpu(lmm->lmm_objects[i].l_ost_gen);
- if (loi->loi_ost_idx >= lov->desc.ld_tgt_count) {
+ for (i = 0; i < lsm->lsm_stripe_count; i++) {
+ /* XXX LOV STACKING call down to osc_unpackmd() */
+ loi = lsm->lsm_oinfo[i];
+ ostid_le_to_cpu(&lmm->lmm_objects[i].l_ost_oi, &loi->loi_oi);
+ loi->loi_ost_idx = le32_to_cpu(lmm->lmm_objects[i].l_ost_idx);
+ loi->loi_ost_gen = le32_to_cpu(lmm->lmm_objects[i].l_ost_gen);
+ if (loi->loi_ost_idx >= lov->desc.ld_tgt_count) {
CERROR("OST index %d more than OST count %d\n",
loi->loi_ost_idx, lov->desc.ld_tgt_count);
lov_dump_lmm_v1(D_WARNING, lmm);
for (i = 0; i < lsm->lsm_stripe_count; i++) {
/* XXX LOV STACKING call down to osc_unpackmd() */
loi = lsm->lsm_oinfo[i];
- loi->loi_id = le64_to_cpu(lmm->lmm_objects[i].l_object_id);
- loi->loi_seq = le64_to_cpu(lmm->lmm_objects[i].l_object_seq);
+ ostid_le_to_cpu(&lmm->lmm_objects[i].l_ost_oi, &loi->loi_oi);
loi->loi_ost_idx = le32_to_cpu(lmm->lmm_objects[i].l_ost_idx);
loi->loi_ost_gen = le32_to_cpu(lmm->lmm_objects[i].l_ost_gen);
if (loi->loi_ost_idx >= lov->desc.ld_tgt_count) {
int err;
err = llog_cancel(env, cctxt, NULL, 1, cookies, flags);
- llog_ctxt_put(cctxt);
- if (err && lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
- CERROR("error: objid "LPX64" subobj "LPX64
- " on OST idx %d: rc = %d\n", lsm->lsm_object_id,
- loi->loi_id, loi->loi_ost_idx, err);
- if (!rc)
- rc = err;
- }
- }
- obd_putref(obd);
- RETURN(rc);
+ llog_ctxt_put(cctxt);
+ if (err && lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
+ CERROR("%s: objid "DOSTID" subobj "DOSTID
+ " on OST idx %d: rc = %d\n",
+ obd->obd_name, POSTID(&lsm->lsm_oi),
+ POSTID(&loi->loi_oi), loi->loi_ost_idx, err);
+ if (!rc)
+ rc = err;
+ }
+ }
+ obd_putref(obd);
+ RETURN(rc);
}
static struct llog_operations lov_mds_ost_orig_logops = {
int lov_merge_lvb_kms(struct lov_stripe_md *lsm,
struct ost_lvb *lvb, __u64 *kms_place)
{
- __u64 size = 0;
- __u64 kms = 0;
- __u64 blocks = 0;
- obd_time current_mtime = lvb->lvb_mtime;
- obd_time current_atime = lvb->lvb_atime;
- obd_time current_ctime = lvb->lvb_ctime;
- int i;
- int rc = 0;
-
- LASSERT_SPIN_LOCKED(&lsm->lsm_lock);
+ __u64 size = 0;
+ __u64 kms = 0;
+ __u64 blocks = 0;
+ obd_time current_mtime = lvb->lvb_mtime;
+ obd_time current_atime = lvb->lvb_atime;
+ obd_time current_ctime = lvb->lvb_ctime;
+ int i;
+ int rc = 0;
+ struct lu_fid fid;
+
+ LASSERT_SPIN_LOCKED(&lsm->lsm_lock);
#ifdef __KERNEL__
- LASSERT(lsm->lsm_lock_owner == cfs_curproc_pid());
+ LASSERT(lsm->lsm_lock_owner == cfs_curproc_pid());
#endif
+ ostid_fid_unpack(&lsm->lsm_oi, &fid);
CDEBUG(D_INODE, "MDT FID "DFID" initial value: s="LPU64" m="LPU64
- " a="LPU64" c="LPU64" b="LPU64"\n",
- lsm->lsm_object_seq, (__u32)lsm->lsm_object_id,
- (__u32)(lsm->lsm_object_id >> 32), lvb->lvb_size,
+ " a="LPU64" c="LPU64" b="LPU64"\n", PFID(&fid), lvb->lvb_size,
lvb->lvb_mtime, lvb->lvb_atime, lvb->lvb_ctime, lvb->lvb_blocks);
- for (i = 0; i < lsm->lsm_stripe_count; i++) {
+ for (i = 0; i < lsm->lsm_stripe_count; i++) {
struct lov_oinfo *loi = lsm->lsm_oinfo[i];
obd_size lov_size, tmpsize;
current_atime = loi->loi_lvb.lvb_atime;
if (loi->loi_lvb.lvb_ctime > current_ctime)
current_ctime = loi->loi_lvb.lvb_ctime;
+
CDEBUG(D_INODE, "MDT FID "DFID" on OST[%u]: s="LPU64" m="LPU64
- " a="LPU64" c="LPU64" b="LPU64"\n",
- lsm->lsm_object_seq, (__u32)lsm->lsm_object_id,
- (__u32)(lsm->lsm_object_id >> 32), loi->loi_ost_idx,
- loi->loi_lvb.lvb_size, loi->loi_lvb.lvb_mtime,
- loi->loi_lvb.lvb_atime, loi->loi_lvb.lvb_ctime,
- loi->loi_lvb.lvb_blocks);
+ " a="LPU64" c="LPU64" b="LPU64"\n", PFID(&fid),
+ loi->loi_ost_idx, loi->loi_lvb.lvb_size,
+ loi->loi_lvb.lvb_mtime, loi->loi_lvb.lvb_atime,
+ loi->loi_lvb.lvb_ctime, loi->loi_lvb.lvb_blocks);
}
*kms_place = kms;
int lov_merge_lvb(struct obd_export *exp,
struct lov_stripe_md *lsm, struct ost_lvb *lvb, int kms_only)
{
+ struct lu_fid fid;
int rc;
__u64 kms;
lov_stripe_unlock(lsm);
if (kms_only)
lvb->lvb_size = kms;
+
+ ostid_fid_unpack(&lsm->lsm_oi, &fid);
CDEBUG(D_INODE, "merged for FID "DFID" s="LPU64" m="LPU64" a="LPU64
- " c="LPU64" b="LPU64"\n",
- lsm->lsm_object_seq, (__u32)lsm->lsm_object_id,
- (__u32)(lsm->lsm_object_id >> 32), lvb->lvb_size, lvb->lvb_mtime,
- lvb->lvb_atime, lvb->lvb_ctime, lvb->lvb_blocks);
+ " c="LPU64" b="LPU64"\n", PFID(&fid), lvb->lvb_size,
+ lvb->lvb_mtime, lvb->lvb_atime, lvb->lvb_ctime, lvb->lvb_blocks);
RETURN(rc);
}
tgt->o_mtime = src->o_mtime;
if (valid & OBD_MD_FLDATAVERSION)
tgt->o_data_version += src->o_data_version;
- } else {
- memcpy(tgt, src, sizeof(*tgt));
- tgt->o_id = lsm->lsm_object_id;
- if (valid & OBD_MD_FLSIZE)
- tgt->o_size = lov_stripe_size(lsm,src->o_size,stripeno);
- }
+ } else {
+ memcpy(tgt, src, sizeof(*tgt));
+ tgt->o_oi = lsm->lsm_oi;
+ if (valid & OBD_MD_FLSIZE)
+ tgt->o_size = lov_stripe_size(lsm, src->o_size,
+ stripeno);
+ }
/* data_version needs to be valid on all stripes to be correct! */
if (!(valid & OBD_MD_FLDATAVERSION))
if (oa->o_valid & OBD_MD_FLCOOKIE)
oti->oti_logcookies = set->set_cookies + req->rq_stripe;
- err = obd_destroy(env, lov->lov_tgts[req->rq_idx]->ltd_exp,
- req->rq_oi.oi_oa, NULL, oti, NULL, capa);
- err = lov_update_common_set(set, req, err);
- if (err) {
- CERROR("error: destroying objid "LPX64" subobj "
- LPX64" on OST idx %d: rc = %d\n",
- oa->o_id, req->rq_oi.oi_oa->o_id,
- req->rq_idx, err);
- if (!rc)
- rc = err;
- }
+ err = obd_destroy(env, lov->lov_tgts[req->rq_idx]->ltd_exp,
+ req->rq_oi.oi_oa, NULL, oti, NULL, capa);
+ err = lov_update_common_set(set, req, err);
+ if (err) {
+ CERROR("%s: destroying objid "DOSTID" subobj "
+ DOSTID" on OST idx %d: rc = %d\n",
+ exp->exp_obd->obd_name, POSTID(&oa->o_oi),
+ POSTID(&req->rq_oi.oi_oa->o_oi),
+ req->rq_idx, err);
+ if (!rc)
+ rc = err;
+ }
}
if (rc == 0) {
cfs_list_for_each (pos, &set->set_list) {
req = cfs_list_entry(pos, struct lov_request, rq_link);
- CDEBUG(D_INFO, "objid "LPX64"[%d] has subobj "LPX64" at idx "
- "%u\n", oinfo->oi_oa->o_id, req->rq_stripe,
- req->rq_oi.oi_oa->o_id, req->rq_idx);
+ CDEBUG(D_INFO, "objid "DOSTID"[%d] has subobj "DOSTID" at idx"
+ " %u\n", POSTID(&oinfo->oi_oa->o_oi), req->rq_stripe,
+ POSTID(&req->rq_oi.oi_oa->o_oi), req->rq_idx);
rc = obd_getattr(env, lov->lov_tgts[req->rq_idx]->ltd_exp,
&req->rq_oi);
- err = lov_update_common_set(set, req, rc);
- if (err) {
- CERROR("error: getattr objid "LPX64" subobj "
- LPX64" on OST idx %d: rc = %d\n",
- oinfo->oi_oa->o_id, req->rq_oi.oi_oa->o_id,
- req->rq_idx, err);
- break;
- }
+ err = lov_update_common_set(set, req, rc);
+ if (err) {
+ CERROR("%s: getattr objid "DOSTID" subobj "
+ DOSTID" on OST idx %d: rc = %d\n",
+ exp->exp_obd->obd_name,
+ POSTID(&oinfo->oi_oa->o_oi),
+ POSTID(&req->rq_oi.oi_oa->o_oi),
+ req->rq_idx, err);
+ break;
+ }
}
rc = lov_fini_getattr_set(set);
if (rc)
RETURN(rc);
- CDEBUG(D_INFO, "objid "LPX64": %ux%u byte stripes\n",
- oinfo->oi_md->lsm_object_id, oinfo->oi_md->lsm_stripe_count,
- oinfo->oi_md->lsm_stripe_size);
-
- cfs_list_for_each (pos, &lovset->set_list) {
- req = cfs_list_entry(pos, struct lov_request, rq_link);
-
- CDEBUG(D_INFO, "objid "LPX64"[%d] has subobj "LPX64" at idx "
- "%u\n", oinfo->oi_oa->o_id, req->rq_stripe,
- req->rq_oi.oi_oa->o_id, req->rq_idx);
- rc = obd_getattr_async(lov->lov_tgts[req->rq_idx]->ltd_exp,
- &req->rq_oi, rqset);
- if (rc) {
- CERROR("error: getattr objid "LPX64" subobj "
- LPX64" on OST idx %d: rc = %d\n",
- oinfo->oi_oa->o_id, req->rq_oi.oi_oa->o_id,
- req->rq_idx, rc);
- GOTO(out, rc);
- }
- }
+ CDEBUG(D_INFO, "objid "DOSTID": %ux%u byte stripes\n",
+ POSTID(&oinfo->oi_md->lsm_oi), oinfo->oi_md->lsm_stripe_count,
+ oinfo->oi_md->lsm_stripe_size);
+
+ cfs_list_for_each(pos, &lovset->set_list) {
+ req = cfs_list_entry(pos, struct lov_request, rq_link);
+
+ CDEBUG(D_INFO, "objid "DOSTID"[%d] has subobj "DOSTID" at idx"
+ "%u\n", POSTID(&oinfo->oi_oa->o_oi), req->rq_stripe,
+ POSTID(&req->rq_oi.oi_oa->o_oi), req->rq_idx);
+ rc = obd_getattr_async(lov->lov_tgts[req->rq_idx]->ltd_exp,
+ &req->rq_oi, rqset);
+ if (rc) {
+ CERROR("%s: getattr objid "DOSTID" subobj"
+ DOSTID" on OST idx %d: rc = %d\n",
+ exp->exp_obd->obd_name,
+ POSTID(&oinfo->oi_oa->o_oi),
+ POSTID(&req->rq_oi.oi_oa->o_oi),
+ req->rq_idx, rc);
+ GOTO(out, rc);
+ }
+ }
if (!cfs_list_empty(&rqset->set_requests)) {
LASSERT(rc == 0);
cfs_list_for_each (pos, &set->set_list) {
req = cfs_list_entry(pos, struct lov_request, rq_link);
- rc = obd_setattr(env, lov->lov_tgts[req->rq_idx]->ltd_exp,
- &req->rq_oi, NULL);
- err = lov_update_setattr_set(set, req, rc);
- if (err) {
- CERROR("error: setattr objid "LPX64" subobj "
- LPX64" on OST idx %d: rc = %d\n",
- set->set_oi->oi_oa->o_id,
- req->rq_oi.oi_oa->o_id, req->rq_idx, err);
- if (!rc)
- rc = err;
- }
+ rc = obd_setattr(env, lov->lov_tgts[req->rq_idx]->ltd_exp,
+ &req->rq_oi, NULL);
+ err = lov_update_setattr_set(set, req, rc);
+ if (err) {
+ CERROR("%s: setattr objid "DOSTID" subobj "
+ DOSTID" on OST idx %d: rc = %d\n",
+ exp->exp_obd->obd_name,
+ POSTID(&set->set_oi->oi_oa->o_oi),
+ POSTID(&req->rq_oi.oi_oa->o_oi), req->rq_idx,
+ err);
+ if (!rc)
+ rc = err;
+ }
}
err = lov_fini_setattr_set(set);
if (!rc)
if (rc)
RETURN(rc);
- CDEBUG(D_INFO, "objid "LPX64": %ux%u byte stripes\n",
- oinfo->oi_md->lsm_object_id, oinfo->oi_md->lsm_stripe_count,
- oinfo->oi_md->lsm_stripe_size);
-
- cfs_list_for_each (pos, &set->set_list) {
- req = cfs_list_entry(pos, struct lov_request, rq_link);
-
- if (oinfo->oi_oa->o_valid & OBD_MD_FLCOOKIE)
- oti->oti_logcookies = set->set_cookies + req->rq_stripe;
-
- CDEBUG(D_INFO, "objid "LPX64"[%d] has subobj "LPX64" at idx "
- "%u\n", oinfo->oi_oa->o_id, req->rq_stripe,
- req->rq_oi.oi_oa->o_id, req->rq_idx);
-
- rc = obd_setattr_async(lov->lov_tgts[req->rq_idx]->ltd_exp,
- &req->rq_oi, oti, rqset);
- if (rc) {
- CERROR("error: setattr objid "LPX64" subobj "
- LPX64" on OST idx %d: rc = %d\n",
- set->set_oi->oi_oa->o_id,
- req->rq_oi.oi_oa->o_id,
- req->rq_idx, rc);
- break;
- }
- }
+ CDEBUG(D_INFO, "objid "DOSTID": %ux%u byte stripes\n",
+ POSTID(&oinfo->oi_md->lsm_oi),
+ oinfo->oi_md->lsm_stripe_count,
+ oinfo->oi_md->lsm_stripe_size);
+
+ cfs_list_for_each(pos, &set->set_list) {
+ req = cfs_list_entry(pos, struct lov_request, rq_link);
+
+ if (oinfo->oi_oa->o_valid & OBD_MD_FLCOOKIE)
+ oti->oti_logcookies = set->set_cookies + req->rq_stripe;
+
+ CDEBUG(D_INFO, "objid "DOSTID"[%d] has subobj "DOSTID" at idx"
+ "%u\n", POSTID(&oinfo->oi_oa->o_oi), req->rq_stripe,
+ POSTID(&req->rq_oi.oi_oa->o_oi), req->rq_idx);
+
+ rc = obd_setattr_async(lov->lov_tgts[req->rq_idx]->ltd_exp,
+ &req->rq_oi, oti, rqset);
+ if (rc) {
+ CERROR("error: setattr objid "DOSTID" subobj"
+ DOSTID" on OST idx %d: rc = %d\n",
+ POSTID(&set->set_oi->oi_oa->o_oi),
+ POSTID(&req->rq_oi.oi_oa->o_oi),
+ req->rq_idx, rc);
+ break;
+ }
+ }
/* If we are not waiting for responses on async requests, return. */
if (rc || !rqset || cfs_list_empty(&rqset->set_requests)) {
cfs_list_for_each (pos, &set->set_list) {
req = cfs_list_entry(pos, struct lov_request, rq_link);
- rc = obd_punch(env, lov->lov_tgts[req->rq_idx]->ltd_exp,
- &req->rq_oi, NULL, rqset);
- if (rc) {
- CERROR("error: punch objid "LPX64" subobj "LPX64
- " on OST idx %d: rc = %d\n",
- set->set_oi->oi_oa->o_id,
- req->rq_oi.oi_oa->o_id, req->rq_idx, rc);
- break;
- }
+ rc = obd_punch(env, lov->lov_tgts[req->rq_idx]->ltd_exp,
+ &req->rq_oi, NULL, rqset);
+ if (rc) {
+ CERROR("%s: punch objid "DOSTID" subobj "DOSTID
+ " on OST idx %d: rc = %d\n",
+ exp->exp_obd->obd_name,
+ POSTID(&set->set_oi->oi_oa->o_oi),
+ POSTID(&req->rq_oi.oi_oa->o_oi), req->rq_idx, rc);
+ break;
+ }
}
if (rc || cfs_list_empty(&rqset->set_requests)) {
if (rc)
RETURN(rc);
- CDEBUG(D_INFO, "fsync objid "LPX64" ["LPX64", "LPX64"]\n",
- set->set_oi->oi_oa->o_id, start, end);
+ CDEBUG(D_INFO, "fsync objid "DOSTID" ["LPX64", "LPX64"]\n",
+ POSTID(&set->set_oi->oi_oa->o_oi), start, end);
cfs_list_for_each (pos, &set->set_list) {
req = cfs_list_entry(pos, struct lov_request, rq_link);
rc = obd_sync(env, lov->lov_tgts[req->rq_idx]->ltd_exp,
&req->rq_oi, req->rq_oi.oi_policy.l_extent.start,
req->rq_oi.oi_policy.l_extent.end, rqset);
- if (rc) {
- CERROR("error: fsync objid "LPX64" subobj "LPX64
- " on OST idx %d: rc = %d\n",
- set->set_oi->oi_oa->o_id,
- req->rq_oi.oi_oa->o_id, req->rq_idx, rc);
- break;
- }
+ if (rc) {
+ CERROR("%s: fsync objid "DOSTID" subobj "DOSTID
+ " on OST idx %d: rc = %d\n",
+ exp->exp_obd->obd_name,
+ POSTID(&set->set_oi->oi_oa->o_oi),
+ POSTID(&req->rq_oi.oi_oa->o_oi), req->rq_idx,
+ rc);
+ break;
+ }
}
/* If we are not waiting for responses on async requests, return. */
continue;
}
- submd.lsm_object_id = loi->loi_id;
- submd.lsm_object_seq = loi->loi_seq;
- submd.lsm_stripe_count = 0;
- rc = obd_change_cbdata(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
- &submd, it, data);
- }
- RETURN(rc);
+ submd.lsm_oi = loi->loi_oi;
+ submd.lsm_stripe_count = 0;
+ rc = obd_change_cbdata(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
+ &submd, it, data);
+ }
+ RETURN(rc);
}
/* find any ldlm lock of the inode in lov
CDEBUG(D_HA, "lov idx %d NULL \n", loi->loi_ost_idx);
continue;
}
-
- submd.lsm_object_id = loi->loi_id;
- submd.lsm_object_seq = loi->loi_seq;
- submd.lsm_stripe_count = 0;
- rc = obd_find_cbdata(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
- &submd, it, data);
- if (rc != 0)
- RETURN(rc);
- }
- RETURN(rc);
+ submd.lsm_oi = loi->loi_oi;
+ submd.lsm_stripe_count = 0;
+ rc = obd_find_cbdata(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
+ &submd, it, data);
+ if (rc != 0)
+ RETURN(rc);
+ }
+ RETURN(rc);
}
static int lov_cancel(struct obd_export *exp, struct lov_stripe_md *lsm,
if (rc)
RETURN(rc);
- cfs_list_for_each (pos, &set->set_list) {
- req = cfs_list_entry(pos, struct lov_request, rq_link);
- lov_lockhp = set->set_lockh->llh_handles + req->rq_stripe;
-
- rc = obd_cancel(lov->lov_tgts[req->rq_idx]->ltd_exp,
- req->rq_oi.oi_md, mode, lov_lockhp);
- rc = lov_update_common_set(set, req, rc);
- if (rc) {
- CERROR("error: cancel objid "LPX64" subobj "
- LPX64" on OST idx %d: rc = %d\n",
- lsm->lsm_object_id,
- req->rq_oi.oi_md->lsm_object_id,
- req->rq_idx, rc);
- err = rc;
- }
+ cfs_list_for_each(pos, &set->set_list) {
+ req = cfs_list_entry(pos, struct lov_request, rq_link);
+ lov_lockhp = set->set_lockh->llh_handles + req->rq_stripe;
+
+ rc = obd_cancel(lov->lov_tgts[req->rq_idx]->ltd_exp,
+ req->rq_oi.oi_md, mode, lov_lockhp);
+ rc = lov_update_common_set(set, req, rc);
+ if (rc) {
+ CERROR("%s: cancel objid "DOSTID" subobj "
+ DOSTID" on OST idx %d: rc = %d\n",
+ exp->exp_obd->obd_name, POSTID(&lsm->lsm_oi),
+ POSTID(&req->rq_oi.oi_md->lsm_oi),
+ req->rq_idx, rc);
+ err = rc;
+ }
- }
- lov_fini_cancel_set(set);
- RETURN(err);
+ }
+ lov_fini_cancel_set(set);
+ RETURN(err);
}
static int lov_cancel_unused(struct obd_export *exp,
ASSERT_LSM_MAGIC(lsm);
- for (i = 0; i < lsm->lsm_stripe_count; i++) {
- struct lov_stripe_md submd;
- struct lov_oinfo *loi = lsm->lsm_oinfo[i];
- int err;
+ for (i = 0; i < lsm->lsm_stripe_count; i++) {
+ struct lov_stripe_md submd;
+ struct lov_oinfo *loi = lsm->lsm_oinfo[i];
+ int idx = loi->loi_ost_idx;
+ int err;
- if (!lov->lov_tgts[loi->loi_ost_idx]) {
- CDEBUG(D_HA, "lov idx %d NULL\n", loi->loi_ost_idx);
- continue;
- }
+ if (!lov->lov_tgts[idx]) {
+ CDEBUG(D_HA, "lov idx %d NULL\n", idx);
+ continue;
+ }
- if (!lov->lov_tgts[loi->loi_ost_idx]->ltd_active)
- CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx);
-
- submd.lsm_object_id = loi->loi_id;
- submd.lsm_object_seq = loi->loi_seq;
- submd.lsm_stripe_count = 0;
- err = obd_cancel_unused(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
- &submd, flags, opaque);
- if (err && lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
- CERROR("error: cancel unused objid "LPX64" subobj "LPX64
- " on OST idx %d: rc = %d\n", lsm->lsm_object_id,
- loi->loi_id, loi->loi_ost_idx, err);
- if (!rc)
- rc = err;
- }
- }
- RETURN(rc);
+ if (!lov->lov_tgts[idx]->ltd_active)
+ CDEBUG(D_HA, "lov idx %d inactive\n", idx);
+
+ submd.lsm_oi = loi->loi_oi;
+ submd.lsm_stripe_count = 0;
+ err = obd_cancel_unused(lov->lov_tgts[idx]->ltd_exp,
+ &submd, flags, opaque);
+ if (err && lov->lov_tgts[idx]->ltd_active) {
+ CERROR("%s: cancel unused objid "DOSTID
+ " subobj "DOSTID" on OST idx %d: rc = %d\n",
+ exp->exp_obd->obd_name, POSTID(&lsm->lsm_oi),
+ POSTID(&loi->loi_oi), idx, err);
+ if (!rc)
+ rc = err;
+ }
+ }
+ RETURN(rc);
}
int lov_statfs_interpret(struct ptlrpc_request_set *rqset, void *data, int rc)
static void lov_dump_lmm_common(int level, void *lmmp)
{
- struct lov_mds_md *lmm = lmmp;
-
- CDEBUG(level, "objid "LPX64", magic 0x%08x, pattern %#x\n",
- (__u64)le64_to_cpu(lmm->lmm_object_id),
- le32_to_cpu(lmm->lmm_magic),
- le32_to_cpu(lmm->lmm_pattern));
- CDEBUG(level,"stripe_size %u, stripe_count %u, layout_gen %u\n",
- le32_to_cpu(lmm->lmm_stripe_size),
- le16_to_cpu(lmm->lmm_stripe_count),
- le16_to_cpu(lmm->lmm_layout_gen));
+ struct lov_mds_md *lmm = lmmp;
+ struct ost_id oi;
+
+ ostid_le_to_cpu(&lmm->lmm_oi, &oi);
+ CDEBUG(level, "objid "DOSTID", magic 0x%08x, pattern %#x\n",
+ POSTID(&oi), le32_to_cpu(lmm->lmm_magic),
+ le32_to_cpu(lmm->lmm_pattern));
+ CDEBUG(level, "stripe_size %u, stripe_count %u, layout_gen %u\n",
+ le32_to_cpu(lmm->lmm_stripe_size),
+ le16_to_cpu(lmm->lmm_stripe_count),
+ le16_to_cpu(lmm->lmm_layout_gen));
}
static void lov_dump_lmm_objects(int level, struct lov_ost_data *lod,
int stripe_count)
{
- int i;
+ int i;
- if (stripe_count > LOV_V1_INSANE_STRIPE_COUNT) {
- CDEBUG(level, "bad stripe_count %u > max_stripe_count %u\n",
- stripe_count, LOV_V1_INSANE_STRIPE_COUNT);
- }
+ if (stripe_count > LOV_V1_INSANE_STRIPE_COUNT) {
+ CDEBUG(level, "bad stripe_count %u > max_stripe_count %u\n",
+ stripe_count, LOV_V1_INSANE_STRIPE_COUNT);
+ }
- for (i = 0; i < stripe_count; ++i, ++lod) {
- CDEBUG(level, "stripe %u idx %u subobj "LPX64"/"LPX64"\n", i,
- le32_to_cpu(lod->l_ost_idx),
- (__u64)le64_to_cpu(lod->l_object_seq),
- (__u64)le64_to_cpu(lod->l_object_id));
- }
+ for (i = 0; i < stripe_count; ++i, ++lod) {
+ struct ost_id oi;
+
+ ostid_le_to_cpu(&lod->l_ost_oi, &oi);
+ CDEBUG(level, "stripe %u idx %u subobj "DOSTID"\n", i,
+ le32_to_cpu(lod->l_ost_idx), POSTID(&oi));
+ }
}
void lov_dump_lmm_v1(int level, struct lov_mds_md_v1 *lmm)
/* lmmv1 and lmmv3 point to the same struct and have the
* same first fields
*/
- lmmv1->lmm_object_id = cpu_to_le64(lsm->lsm_object_id);
- lmmv1->lmm_object_seq = cpu_to_le64(lsm->lsm_object_seq);
+ ostid_cpu_to_le(&lsm->lsm_oi, &lmmv1->lmm_oi);
lmmv1->lmm_stripe_size = cpu_to_le32(lsm->lsm_stripe_size);
lmmv1->lmm_stripe_count = cpu_to_le16(stripe_count);
lmmv1->lmm_pattern = cpu_to_le32(lsm->lsm_pattern);
lmm_objects = lmmv1->lmm_objects;
}
- for (i = 0; i < stripe_count; i++) {
- struct lov_oinfo *loi = lsm->lsm_oinfo[i];
- /* XXX LOV STACKING call down to osc_packmd() to do packing */
- LASSERTF(loi->loi_id, "lmm_oid "LPU64" stripe %u/%u idx %u\n",
- lmmv1->lmm_object_id, i, stripe_count, loi->loi_ost_idx);
- lmm_objects[i].l_object_id = cpu_to_le64(loi->loi_id);
- lmm_objects[i].l_object_seq = cpu_to_le64(loi->loi_seq);
- lmm_objects[i].l_ost_gen = cpu_to_le32(loi->loi_ost_gen);
- lmm_objects[i].l_ost_idx = cpu_to_le32(loi->loi_ost_idx);
- }
+ for (i = 0; i < stripe_count; i++) {
+ struct lov_oinfo *loi = lsm->lsm_oinfo[i];
+ /* XXX LOV STACKING call down to osc_packmd() to do packing */
+ LASSERTF(loi->loi_id != 0, "lmm_oi "DOSTID" stripe %u/%u"
+ " idx %u\n", POSTID(&lmmv1->lmm_oi), i, stripe_count,
+ loi->loi_ost_idx);
+ ostid_cpu_to_le(&loi->loi_oi, &lmm_objects[i].l_ost_oi);
+ lmm_objects[i].l_ost_gen = cpu_to_le32(loi->loi_ost_gen);
+ lmm_objects[i].l_ost_idx = cpu_to_le32(loi->loi_ost_idx);
+ }
- RETURN(lmm_size);
+ RETURN(lmm_size);
}
/* Find the max stripecount we should use */
struct ost_lvb *lvb, __u32 mode, int rc);
static int lov_update_enqueue_lov(struct obd_export *exp,
- struct lustre_handle *lov_lockhp,
- struct lov_oinfo *loi, int flags, int idx,
- __u64 oid, int rc)
+ struct lustre_handle *lov_lockhp,
+ struct lov_oinfo *loi, int flags, int idx,
+ struct ost_id *oi, int rc)
{
- struct lov_obd *lov = &exp->exp_obd->u.lov;
-
- if (rc != ELDLM_OK &&
- !(rc == ELDLM_LOCK_ABORTED && (flags & LDLM_FL_HAS_INTENT))) {
- memset(lov_lockhp, 0, sizeof(*lov_lockhp));
- if (lov->lov_tgts[idx] && lov->lov_tgts[idx]->ltd_active) {
- /* -EUSERS used by OST to report file contention */
- if (rc != -EINTR && rc != -EUSERS)
- CERROR("enqueue objid "LPX64" subobj "
- LPX64" on OST idx %d: rc %d\n",
- oid, loi->loi_id, loi->loi_ost_idx, rc);
- } else
- rc = ELDLM_OK;
- }
- return rc;
+ struct lov_obd *lov = &exp->exp_obd->u.lov;
+
+ if (rc != ELDLM_OK &&
+ !(rc == ELDLM_LOCK_ABORTED && (flags & LDLM_FL_HAS_INTENT))) {
+ memset(lov_lockhp, 0, sizeof(*lov_lockhp));
+ if (lov->lov_tgts[idx] && lov->lov_tgts[idx]->ltd_active) {
+ /* -EUSERS used by OST to report file contention */
+ if (rc != -EINTR && rc != -EUSERS)
+ CERROR("%s: enqueue objid "DOSTID" subobj"
+ DOSTID" on OST idx %d: rc %d\n",
+ exp->exp_obd->obd_name,
+ POSTID(oi), POSTID(&loi->loi_oi),
+ loi->loi_ost_idx, rc);
+ } else
+ rc = ELDLM_OK;
+ }
+ return rc;
}
int lov_update_enqueue_set(struct lov_request *req, __u32 mode, int rc)
&req->rq_oi.oi_md->lsm_oinfo[0]->loi_lvb, mode, rc);
if (rc == ELDLM_LOCK_ABORTED && (oi->oi_flags & LDLM_FL_HAS_INTENT))
memset(lov_lockhp, 0, sizeof *lov_lockhp);
- rc = lov_update_enqueue_lov(set->set_exp, lov_lockhp, loi, oi->oi_flags,
- req->rq_idx, oi->oi_md->lsm_object_id, rc);
- lov_stripe_unlock(oi->oi_md);
- lov_update_set(set, req, rc);
- RETURN(rc);
+ rc = lov_update_enqueue_lov(set->set_exp, lov_lockhp, loi, oi->oi_flags,
+ req->rq_idx, &oi->oi_md->lsm_oi, rc);
+ lov_stripe_unlock(oi->oi_md);
+ lov_update_set(set, req, rc);
+ RETURN(rc);
}
/* The callback for osc_enqueue that updates lov info for every OSC request. */
if (!lustre_handle_is_used(lov_lockhp))
continue;
- rc = obd_cancel(lov->lov_tgts[req->rq_idx]->ltd_exp,
- req->rq_oi.oi_md, mode, lov_lockhp);
- if (rc && lov->lov_tgts[req->rq_idx] &&
- lov->lov_tgts[req->rq_idx]->ltd_active)
- CERROR("cancelling obdjid "LPX64" on OST "
- "idx %d error: rc = %d\n",
- req->rq_oi.oi_md->lsm_object_id,
- req->rq_idx, rc);
- }
+ rc = obd_cancel(lov->lov_tgts[req->rq_idx]->ltd_exp,
+ req->rq_oi.oi_md, mode, lov_lockhp);
+ if (rc && lov->lov_tgts[req->rq_idx] &&
+ lov->lov_tgts[req->rq_idx]->ltd_active)
+ CERROR("%s: cancelling obdjid "DOSTID" on OST"
+ "idx %d error: rc = %d\n",
+ set->set_exp->exp_obd->obd_name,
+ POSTID(&req->rq_oi.oi_md->lsm_oi),
+ req->rq_idx, rc);
+ }
if (set->set_lockh)
lov_llh_put(set->set_lockh);
RETURN(rc);
req->rq_idx = loi->loi_ost_idx;
req->rq_stripe = i;
- /* XXX LOV STACKING: submd should be from the subobj */
- req->rq_oi.oi_md->lsm_object_id = loi->loi_id;
- req->rq_oi.oi_md->lsm_object_seq = loi->loi_seq;
- req->rq_oi.oi_md->lsm_stripe_count = 0;
- req->rq_oi.oi_md->lsm_oinfo[0]->loi_kms_valid =
- loi->loi_kms_valid;
- req->rq_oi.oi_md->lsm_oinfo[0]->loi_kms = loi->loi_kms;
- req->rq_oi.oi_md->lsm_oinfo[0]->loi_lvb = loi->loi_lvb;
+ /* XXX LOV STACKING: submd should be from the subobj */
+ req->rq_oi.oi_md->lsm_oi = loi->loi_oi;
+ req->rq_oi.oi_md->lsm_stripe_count = 0;
+ req->rq_oi.oi_md->lsm_oinfo[0]->loi_kms_valid =
+ loi->loi_kms_valid;
+ req->rq_oi.oi_md->lsm_oinfo[0]->loi_kms = loi->loi_kms;
+ req->rq_oi.oi_md->lsm_oinfo[0]->loi_lvb = loi->loi_lvb;
lov_set_add_req(req, set);
}
req->rq_idx = loi->loi_ost_idx;
req->rq_stripe = i;
- /* XXX LOV STACKING: submd should be from the subobj */
- req->rq_oi.oi_md->lsm_object_id = loi->loi_id;
- req->rq_oi.oi_md->lsm_object_seq = loi->loi_seq;
- req->rq_oi.oi_md->lsm_stripe_count = 0;
+ /* XXX LOV STACKING: submd should be from the subobj */
+ req->rq_oi.oi_md->lsm_oi = loi->loi_oi;
+ req->rq_oi.oi_md->lsm_stripe_count = 0;
lov_set_add_req(req, set);
}
req->rq_idx = loi->loi_ost_idx;
req->rq_stripe = i;
- /* XXX LOV STACKING: submd should be from the subobj */
- req->rq_oi.oi_md->lsm_object_id = loi->loi_id;
- req->rq_oi.oi_md->lsm_object_seq = loi->loi_seq;
- req->rq_oi.oi_md->lsm_stripe_count = 0;
+ /* XXX LOV STACKING: submd should be from the subobj */
+ req->rq_oi.oi_md->lsm_oi = loi->loi_oi;
+ req->rq_oi.oi_md->lsm_stripe_count = 0;
lov_set_add_req(req, set);
}
req->rq_idx = loi->loi_ost_idx;
req->rq_stripe = i;
- /* XXX LOV STACKING */
- req->rq_oi.oi_md->lsm_object_id = loi->loi_id;
- req->rq_oi.oi_md->lsm_object_seq = loi->loi_seq;
- req->rq_oabufs = info[i].count;
- req->rq_pgaidx = shift;
- shift += req->rq_oabufs;
+ /* XXX LOV STACKING */
+ req->rq_oi.oi_md->lsm_oi = loi->loi_oi;
+ req->rq_oabufs = info[i].count;
+ req->rq_pgaidx = shift;
+ shift += req->rq_oabufs;
/* remember the index for sort brw_page array */
info[i].index = req->rq_pgaidx;
/* set the file specific informations in lmm */
if (fst_lmm) {
fst_lmm->lmm_layout_gen = cpu_to_le16(snd_gen);
- fst_lmm->lmm_object_seq = snd_lmm->lmm_object_seq;
- fst_lmm->lmm_object_id = snd_lmm->lmm_object_id;
+ fst_lmm->lmm_oi = snd_lmm->lmm_oi;
}
if (snd_lmm) {
snd_lmm->lmm_layout_gen = cpu_to_le16(fst_gen);
- snd_lmm->lmm_object_seq = old_fst_lmm->lmm_object_seq;
- snd_lmm->lmm_object_id = old_fst_lmm->lmm_object_id;
+ snd_lmm->lmm_oi = old_fst_lmm->lmm_oi;
}
/* prepare transaction */
/* restore object_id, object_seq and generation number
* on first file */
if (fst_lmm) {
- fst_lmm->lmm_object_id = old_fst_lmm->lmm_object_id;
- fst_lmm->lmm_object_seq = old_fst_lmm->lmm_object_seq;
+ fst_lmm->lmm_oi = old_fst_lmm->lmm_oi;
fst_lmm->lmm_layout_gen = old_fst_lmm->lmm_layout_gen;
}
count = le16_to_cpu(((struct lov_user_md*)lmm)->lmm_stripe_count);
- CDEBUG(level, "objid "LPX64", magic 0x%08X, pattern %#X\n",
- le64_to_cpu(lmm->lmm_object_id), le32_to_cpu(lmm->lmm_magic),
- le32_to_cpu(lmm->lmm_pattern));
+ CDEBUG(level, "objid "DOSTID", magic 0x%08X, pattern %#X\n",
+ POSTID(&lmm->lmm_oi), le32_to_cpu(lmm->lmm_magic),
+ le32_to_cpu(lmm->lmm_pattern));
CDEBUG(level,"stripe_size=0x%x, stripe_count=0x%x\n",
le32_to_cpu(lmm->lmm_stripe_size), count);
if (count == LOV_ALL_STRIPES)
return;
- LASSERT(count <= LOV_MAX_STRIPE_COUNT);
- for (i = 0, lod = lmm->lmm_objects; i < count; i++, lod++)
- CDEBUG(level, "stripe %u idx %u subobj "LPX64"/"LPX64"\n",
- i, le32_to_cpu(lod->l_ost_idx),
- le64_to_cpu(lod->l_object_seq),
- le64_to_cpu(lod->l_object_id));
+
+ LASSERT(count <= LOV_MAX_STRIPE_COUNT);
+ for (i = 0, lod = lmm->lmm_objects; i < count; i++, lod++) {
+ struct ost_id oi;
+ ostid_le_to_cpu((struct ost_id *)&lod->l_ost_oi, &oi);
+ CDEBUG(level, "stripe %u idx %u subobj "DOSTID"\n",
+ i, le32_to_cpu(lod->l_ost_idx), POSTID(&oi));
+ }
}
/* Shrink and/or grow reply buffers */
void dump_lsm(int level, struct lov_stripe_md *lsm)
{
- CDEBUG(level, "lsm %p, objid "LPX64", maxbytes "LPX64", magic 0x%08X, "
- "stripe_size %u, stripe_count %u, refc: %d, "
- "layout_gen %u, pool ["LOV_POOLNAMEF"]\n", lsm,
- lsm->lsm_object_id, lsm->lsm_maxbytes, lsm->lsm_magic,
+ CDEBUG(level, "lsm %p, objid "DOSTID", maxbytes "LPX64", magic 0x%08X,"
+ " stripe_size %u, stripe_count %u, refc: %d,"
+ " layout_gen %u, pool ["LOV_POOLNAMEF"]\n", lsm,
+ POSTID(&lsm->lsm_oi), lsm->lsm_maxbytes, lsm->lsm_magic,
lsm->lsm_stripe_size, lsm->lsm_stripe_count,
cfs_atomic_read(&lsm->lsm_refc), lsm->lsm_layout_gen,
lsm->lsm_pool_name);
return container_of(c, struct echo_object_conf, eoc_cl);
}
-static inline void lsm2fid(struct lov_stripe_md *lsm, struct lu_fid *fid)
-{
- fid_zero(fid);
- fid->f_seq = FID_SEQ_ECHO;
- /* truncated to 32 bits by assignment */
- fid->f_oid = lsm->lsm_object_id;
- fid->f_ver = lsm->lsm_object_id >> 32;
-}
/** @} echo_helpers */
static struct echo_object *cl_echo_object_find(struct echo_device *d,
loi_init((*lsmp)->lsm_oinfo[0]);
(*lsmp)->lsm_maxbytes = LUSTRE_STRIPE_MAXBYTES;
+ (*lsmp)->lsm_oi.oi_seq = FID_SEQ_ECHO;
RETURN(lsm_size);
}
int refcheck;
ENTRY;
- LASSERT(lsmp);
- lsm = *lsmp;
- LASSERT(lsm);
- LASSERT(lsm->lsm_object_id);
+ LASSERT(lsmp);
+ lsm = *lsmp;
+ LASSERT(lsm);
+ LASSERT(ostid_id(&lsm->lsm_oi) != 0);
+ LASSERT(ostid_seq(&lsm->lsm_oi) == FID_SEQ_ECHO);
/* Never return an object if the obd is to be freed. */
if (echo_dev2cl(d)->cd_lu_dev.ld_obd->obd_stopping)
if (!d->ed_next_islov) {
struct lov_oinfo *oinfo = lsm->lsm_oinfo[0];
LASSERT(oinfo != NULL);
- oinfo->loi_id = lsm->lsm_object_id;
- oinfo->loi_seq = lsm->lsm_object_seq;
+ oinfo->loi_oi = lsm->lsm_oi;
conf->eoc_cl.u.coc_oinfo = oinfo;
} else {
struct lustre_md *md;
conf->eoc_md = lsmp;
fid = &info->eti_fid;
- lsm2fid(lsm, fid);
+ ostid_fid_unpack(&lsm->lsm_oi, fid);
/* In the function below, .hs_keycmp resolves to
* lu_obj_hop_keycmp() */
idx = cfs_rand();
- /* setup stripes: indices + default ids if required */
- for (i = 0; i < lsm->lsm_stripe_count; i++) {
- if (lsm->lsm_oinfo[i]->loi_id == 0)
- lsm->lsm_oinfo[i]->loi_id = lsm->lsm_object_id;
+ /* setup stripes: indices + default ids if required */
+ for (i = 0; i < lsm->lsm_stripe_count; i++) {
+ if (lsm->lsm_oinfo[i]->loi_id == 0)
+ lsm->lsm_oinfo[i]->loi_oi = lsm->lsm_oi;
- lsm->lsm_oinfo[i]->loi_ost_idx =
- (idx + i) % ec->ec_nstripes;
- }
+ lsm->lsm_oinfo[i]->loi_ost_idx =
+ (idx + i) % ec->ec_nstripes;
+ }
}
- /* setup object ID here for !on_target and LOV hint */
- if (oa->o_valid & OBD_MD_FLID)
- lsm->lsm_object_id = oa->o_id;
+ /* setup object ID here for !on_target and LOV hint */
+ if (oa->o_valid & OBD_MD_FLID)
+ lsm->lsm_oi.oi_id = oa->o_id;
- if (lsm->lsm_object_id == 0)
- lsm->lsm_object_id = ++last_object_id;
+ if (ostid_id(&lsm->lsm_oi) == 0)
+ lsm->lsm_oi.oi_id = ++last_object_id;
rc = 0;
if (on_target) {
}
/* See what object ID we were given */
- oa->o_id = lsm->lsm_object_id;
+ oa->o_oi = lsm->lsm_oi;
oa->o_valid |= OBD_MD_FLID;
eco = cl_echo_object_find(ed, &lsm);
if (rc < 0)
RETURN(rc);
- lsm->lsm_object_id = oa->o_id;
- if (oa->o_valid & OBD_MD_FLGROUP)
- lsm->lsm_object_seq = oa->o_seq;
- else
- lsm->lsm_object_seq = FID_SEQ_ECHO;
+ lsm->lsm_oi = oa->o_oi;
+ if (!(oa->o_valid & OBD_MD_FLGROUP))
+ lsm->lsm_oi.oi_seq = FID_SEQ_ECHO;
rc = 0;
eco = cl_echo_object_find(ed, &lsm);
gfp_mask = ((oa->o_id & 2) == 0) ? CFS_ALLOC_STD : CFS_ALLOC_HIGHUSER;
- LASSERT(rw == OBD_BRW_WRITE || rw == OBD_BRW_READ);
- LASSERT(lsm != NULL);
- LASSERT(lsm->lsm_object_id == oa->o_id);
+ LASSERT(rw == OBD_BRW_WRITE || rw == OBD_BRW_READ);
+ LASSERT(lsm != NULL);
+ LASSERT(ostid_id(&lsm->lsm_oi) == ostid_id(&oa->o_oi));
if (count <= 0 ||
(count & (~CFS_PAGE_MASK)) != 0)
ENTRY;
- if (count <= 0 || (count & (~CFS_PAGE_MASK)) != 0 ||
- (lsm != NULL && lsm->lsm_object_id != oa->o_id))
- RETURN(-EINVAL);
+ if (count <= 0 || (count & (~CFS_PAGE_MASK)) != 0 ||
+ (lsm != NULL && ostid_id(&lsm->lsm_oi) != ostid_id(&oa->o_oi)))
+ RETURN(-EINVAL);
npages = batch >> CFS_PAGE_SHIFT;
tot_pages = count >> CFS_PAGE_SHIFT;
#define DEBUG_SUBSYSTEM S_FILTER
+#include <lustre/lustre_idl.h>
#include "ofd_internal.h"
#include <obd_cksum.h>
#include <lustre_quota.h>
ofd_info_init(&env, exp);
ostid_le_to_cpu(oid, oid);
- CDEBUG(D_HA, "Get LAST FID for seq "LPX64"\n", oid->oi_seq);
oseq = ofd_seq_load(&env, ofd, oid->oi_seq);
if (IS_ERR(oseq))
GOTO(out_fini, rc = PTR_ERR(oseq));
- CDEBUG(D_HA, "LAST FID is "POSTID"\n", oseq->os_last_oid,
- oseq->os_seq);
+ CDEBUG(D_HA, "LAST FID is "DOSTID"\n", POSTID(&oseq->os_oi));
*oid = oseq->os_oi;
*vallen = sizeof(*oid);
if (rc == 0 && ea != NULL) {
struct lov_stripe_md *lsm = *ea;
- lsm->lsm_object_id = oa->o_id;
+ lsm->lsm_oi = oa->o_oi;
}
ofd_seq_put(env, oseq);
RETURN(rc);
#define DEBUG_SUBSYSTEM S_FILTER
#include <dt_object.h>
+#include <lustre/lustre_idl.h>
#include "ofd_internal.h"
/* Don't create objects beyond the valid range for this SEQ */
if (unlikely(fid_seq_is_mdt0(oseq->os_seq) && (id + nr) >= IDIF_MAX_OID)) {
- CERROR("%s:"POSTID" hit the IDIF_MAX_OID (1<<48)!\n",
+ CERROR("%s:"DOSTID" hit the IDIF_MAX_OID (1<<48)!\n",
ofd_name(ofd), id, oseq->os_seq);
RETURN(rc = -ENOSPC);
} else if (unlikely(!fid_seq_is_mdt0(oseq->os_seq) &&
(id + nr) >= OBIF_MAX_OID)) {
- CERROR("%s:"POSTID" hit the OBIF_MAX_OID (1<<32)!\n",
+ CERROR("%s:"DOSTID" hit the OBIF_MAX_OID (1<<32)!\n",
ofd_name(ofd), id, oseq->os_seq);
RETURN(rc = -ENOSPC);
}
OBD_FREE(*lmmp, lmm_size);
*lmmp = NULL;
RETURN(0);
- } else if (unlikely(lsm != NULL && lsm->lsm_object_id == 0)) {
+ } else if (unlikely(lsm != NULL && ostid_id(&lsm->lsm_oi) == 0)) {
RETURN(-EBADF);
}
RETURN(-ENOMEM);
}
- if (lsm != NULL) {
- (*lmmp)->lmm_object_id = cpu_to_le64(lsm->lsm_object_id);
- (*lmmp)->lmm_object_seq = cpu_to_le64(lsm->lsm_object_seq);
- }
+ if (lsm)
+ ostid_cpu_to_le(&lsm->lsm_oi, &(*lmmp)->lmm_oi);
RETURN(lmm_size);
}
}
/* XXX LOV_MAGIC etc check? */
- if (unlikely(lmm->lmm_object_id == 0)) {
- CERROR("%s: zero lmm_object_id\n",
- exp->exp_obd->obd_name);
+ if (unlikely(ostid_id(&lmm->lmm_oi) == 0)) {
+ CERROR("%s: zero lmm_object_id: rc = %d\n",
+ exp->exp_obd->obd_name, -EINVAL);
RETURN(-EINVAL);
}
}
RETURN(-ENOMEM);
}
loi_init((*lsmp)->lsm_oinfo[0]);
- } else if (unlikely((*lsmp)->lsm_object_id == 0)) {
+ } else if (unlikely(ostid_id(&(*lsmp)->lsm_oi) == 0)) {
RETURN(-EBADF);
}
- if (lmm != NULL) {
+ if (lmm != NULL)
/* XXX zero *lsmp? */
- (*lsmp)->lsm_object_id = le64_to_cpu(lmm->lmm_object_id);
- (*lsmp)->lsm_object_seq = le64_to_cpu(lmm->lmm_object_seq);
- }
+ ostid_le_to_cpu(&lmm->lmm_oi, &(*lsmp)->lsm_oi);
if (imp != NULL &&
(imp->imp_connect_data.ocd_connect_flags & OBD_CONNECT_MAXBYTES))
oa->o_blksize = cli_brw_size(exp->exp_obd);
oa->o_valid |= OBD_MD_FLBLKSZ;
- /* XXX LOV STACKING: the lsm that is passed to us from LOV does not
- * have valid lsm_oinfo data structs, so don't go touching that.
- * This needs to be fixed in a big way.
- */
- lsm->lsm_object_id = oa->o_id;
- lsm->lsm_object_seq = oa->o_seq;
- *ea = lsm;
+ /* XXX LOV STACKING: the lsm that is passed to us from LOV does not
+ * have valid lsm_oinfo data structs, so don't go touching that.
+ * This needs to be fixed in a big way.
+ */
+ lsm->lsm_oi = oa->o_oi;
+ *ea = lsm;
if (oti != NULL) {
oti->oti_transno = lustre_msg_get_transno(req->rq_repmsg);
struct ldlm_res_id res_id;
struct obd_device *obd = class_exp2obd(exp);
- ostid_build_res_name(&lsm->lsm_object_oid, &res_id);
+ ostid_build_res_name(&lsm->lsm_oi, &res_id);
ldlm_resource_iterate(obd->obd_namespace, &res_id, replace, data);
return 0;
}
struct obd_device *obd = class_exp2obd(exp);
int rc = 0;
- ostid_build_res_name(&lsm->lsm_object_oid, &res_id);
+ ostid_build_res_name(&lsm->lsm_oi, &res_id);
rc = ldlm_resource_iterate(obd->obd_namespace, &res_id, replace, data);
if (rc == LDLM_ITER_STOP)
return(1);
int rc;
ENTRY;
- ostid_build_res_name(&oinfo->oi_md->lsm_object_oid, &res_id);
+ ostid_build_res_name(&oinfo->oi_md->lsm_oi, &res_id);
rc = osc_enqueue_base(exp, &res_id, &oinfo->oi_flags, &oinfo->oi_policy,
&oinfo->oi_md->lsm_oinfo[0]->loi_lvb,
oinfo->oi_md->lsm_oinfo[0]->loi_kms_valid,
struct ldlm_res_id res_id, *resp = NULL;
if (lsm != NULL) {
- ostid_build_res_name(&lsm->lsm_object_oid, &res_id);
+ ostid_build_res_name(&lsm->lsm_oi, &res_id);
resp = &res_id;
}
if (!lumk)
RETURN(-ENOMEM);
- if (lum.lmm_magic == LOV_USER_MAGIC_V1)
- lmm_objects = &(((struct lov_user_md_v1 *)lumk)->lmm_objects[0]);
- else
- lmm_objects = &(lumk->lmm_objects[0]);
- lmm_objects->l_object_id = lsm->lsm_object_id;
- } else {
- lum_size = lov_mds_md_size(0, lum.lmm_magic);
- lumk = &lum;
- }
+ if (lum.lmm_magic == LOV_USER_MAGIC_V1)
+ lmm_objects =
+ &(((struct lov_user_md_v1 *)lumk)->lmm_objects[0]);
+ else
+ lmm_objects = &(lumk->lmm_objects[0]);
+ lmm_objects->l_ost_oi = lsm->lsm_oi;
+ } else {
+ lum_size = lov_mds_md_size(0, lum.lmm_magic);
+ lumk = &lum;
+ }
- lumk->lmm_object_id = lsm->lsm_object_id;
- lumk->lmm_object_seq = lsm->lsm_object_seq;
+ lumk->lmm_oi = lsm->lsm_oi;
lumk->lmm_stripe_count = 1;
if (cfs_copy_to_user(lump, lumk, lum_size))
} else if (unlikely(oa == NULL || !(fid_seq_is_idif(oa->o_seq) ||
fid_seq_is_mdt(oa->o_seq) ||
fid_seq_is_echo(oa->o_seq)))) {
- CERROR("%s: client %s sent bad object "POSTID": rc = -EPROTO\n",
+ CERROR("%s: client %s sent bad object "DOSTID": rc = -EPROTO\n",
exp->exp_obd->obd_name, obd_export_nid2str(exp),
oa ? oa->o_id : -1, oa ? oa->o_seq : -1);
return -EPROTO;
unsigned max_brw = ioobj_max_brw_get(ioobj);
if (unlikely((max_brw & (max_brw - 1)) != 0)) {
- CERROR("%s: client %s sent bad ioobj max %u for "POSTID
+ CERROR("%s: client %s sent bad ioobj max %u for "DOSTID
": rc = -EPROTO\n", exp->exp_obd->obd_name,
obd_export_nid2str(exp), max_brw,
- oa->o_id, oa->o_seq);
+ POSTID(&oa->o_oi));
return -EPROTO;
}
ioobj_from_obdo(ioobj, oa);
CDEBUG(D_OTHER, "lov_user_md %p:\n", lum);
CDEBUG(D_OTHER, "\tlmm_magic: %#x\n", lum->lmm_magic);
CDEBUG(D_OTHER, "\tlmm_pattern: %#x\n", lum->lmm_pattern);
- CDEBUG(D_OTHER, "\tlmm_object_id: "LPU64"\n", lum->lmm_object_id);
- CDEBUG(D_OTHER, "\tlmm_object_gr: "LPU64"\n", lum->lmm_object_seq);
+ CDEBUG(D_OTHER, "\tlmm_object_id: "LPU64"\n", ostid_id(&lum->lmm_oi));
+ CDEBUG(D_OTHER, "\tlmm_object_gr: "LPU64"\n", ostid_seq(&lum->lmm_oi));
CDEBUG(D_OTHER, "\tlmm_stripe_size: %#x\n", lum->lmm_stripe_size);
CDEBUG(D_OTHER, "\tlmm_stripe_count: %#x\n", lum->lmm_stripe_count);
CDEBUG(D_OTHER, "\tlmm_stripe_offset/lmm_layout_gen: %#x\n",
ENTRY;
__swab32s(&lum->lmm_magic);
__swab32s(&lum->lmm_pattern);
- __swab64s(&lum->lmm_object_id);
- __swab64s(&lum->lmm_object_seq);
+ lustre_swab_ost_id(&lum->lmm_oi);
__swab32s(&lum->lmm_stripe_size);
__swab16s(&lum->lmm_stripe_count);
__swab16s(&lum->lmm_stripe_offset);
void lustre_swab_lov_mds_md(struct lov_mds_md *lmm)
{
- ENTRY;
- CDEBUG(D_IOCTL, "swabbing lov_mds_md\n");
- __swab32s(&lmm->lmm_magic);
- __swab32s(&lmm->lmm_pattern);
- __swab64s(&lmm->lmm_object_id);
- __swab64s(&lmm->lmm_object_seq);
- __swab32s(&lmm->lmm_stripe_size);
- __swab16s(&lmm->lmm_stripe_count);
- __swab16s(&lmm->lmm_layout_gen);
- EXIT;
+ ENTRY;
+ CDEBUG(D_IOCTL, "swabbing lov_mds_md\n");
+ __swab32s(&lmm->lmm_magic);
+ __swab32s(&lmm->lmm_pattern);
+ lustre_swab_ost_id(&lmm->lmm_oi);
+ __swab32s(&lmm->lmm_stripe_size);
+ __swab16s(&lmm->lmm_stripe_count);
+ __swab16s(&lmm->lmm_layout_gen);
+ EXIT;
}
EXPORT_SYMBOL(lustre_swab_lov_mds_md);
{
/* Wire protocol assertions generated by 'wirecheck'
* (make -C lustre/utils newwiretest)
- * running on Linux mercury 2.6.32-279.5.1.el6_lustre.x86_64 #1 SMP Tue Aug 21 00:00:41 PDT 2
+ * running on Linux testnode 2.6.32-279.5.1.el6_lustre.g53f705f.x86_64 #1 SMP Mon Oct 8 05:12
* with gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) */
/* Checks for struct lov_ost_data_v1 */
LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, "found %lld\n",
(long long)(int)sizeof(struct lov_ost_data_v1));
- LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_id) == 0, "found %lld\n",
- (long long)(int)offsetof(struct lov_ost_data_v1, l_object_id));
- LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id));
- LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_seq) == 8, "found %lld\n",
- (long long)(int)offsetof(struct lov_ost_data_v1, l_object_seq));
- LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_seq) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_seq));
+ LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_oi.oi_id) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_oi.oi_id));
+ LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_oi.oi_id) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_oi.oi_id));
+ LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_oi.oi_seq) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_oi.oi_seq));
+ LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_oi.oi_seq) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_oi.oi_seq));
LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_gen) == 16, "found %lld\n",
(long long)(int)offsetof(struct lov_ost_data_v1, l_ost_gen));
LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen) == 4, "found %lld\n",
(long long)(int)offsetof(struct lov_mds_md_v1, lmm_pattern));
LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern) == 4, "found %lld\n",
(long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern));
- LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_id) == 8, "found %lld\n",
- (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_id));
- LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id));
- LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_seq) == 16, "found %lld\n",
- (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_seq));
- LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_seq) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_seq));
+ LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_oi) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lov_mds_md_v1, lmm_oi));
+ LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_oi) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_oi));
LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_size) == 24, "found %lld\n",
(long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_size));
LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size) == 4, "found %lld\n",
(long long)(int)offsetof(struct lov_mds_md_v3, lmm_pattern));
LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pattern) == 4, "found %lld\n",
(long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pattern));
- LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_object_id) == 8, "found %lld\n",
- (long long)(int)offsetof(struct lov_mds_md_v3, lmm_object_id));
- LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_object_id) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_object_id));
- LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_object_seq) == 16, "found %lld\n",
- (long long)(int)offsetof(struct lov_mds_md_v3, lmm_object_seq));
- LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_object_seq) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_object_seq));
+ LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_oi) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lov_mds_md_v3, lmm_oi));
+ LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_oi) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_oi));
LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_stripe_size) == 24, "found %lld\n",
(long long)(int)offsetof(struct lov_mds_md_v3, lmm_stripe_size));
LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_stripe_size) == 4, "found %lld\n",
char nl = is_dir ? ' ' : '\n';
int rc;
- if (is_dir && lum->lmm_object_seq == FID_SEQ_LOV_DEFAULT) {
- lum->lmm_object_seq = FID_SEQ_OST_MDT0;
- if (verbose & VERBOSE_DETAIL)
- llapi_printf(LLAPI_MSG_NORMAL, "(Default) ");
- }
+ if (is_dir && ostid_seq(&lum->lmm_oi) == FID_SEQ_LOV_DEFAULT) {
+ lum->lmm_oi.oi_seq = FID_SEQ_OST_MDT0;
+ if (verbose & VERBOSE_DETAIL)
+ llapi_printf(LLAPI_MSG_NORMAL, "(Default) ");
+ }
if (depth && path && ((verbose != VERBOSE_OBJID) || !is_dir))
llapi_printf(LLAPI_MSG_NORMAL, "%s\n", path);
- if ((verbose & VERBOSE_DETAIL) && !is_dir) {
- llapi_printf(LLAPI_MSG_NORMAL, "lmm_magic: 0x%08X\n",
- lum->lmm_magic);
- llapi_printf(LLAPI_MSG_NORMAL, "lmm_seq: "LPX64"\n",
- lum->lmm_object_seq);
- llapi_printf(LLAPI_MSG_NORMAL, "lmm_object_id: "LPX64"\n",
- lum->lmm_object_id);
- }
+ if ((verbose & VERBOSE_DETAIL) && !is_dir) {
+ llapi_printf(LLAPI_MSG_NORMAL, "lmm_magic: 0x%08X\n",
+ lum->lmm_magic);
+ llapi_printf(LLAPI_MSG_NORMAL, "lmm_seq: "LPX64"\n",
+ ostid_seq(&lum->lmm_oi));
+ llapi_printf(LLAPI_MSG_NORMAL, "lmm_object_id: "LPX64"\n",
+ ostid_id(&lum->lmm_oi));
+ }
if (verbose & VERBOSE_COUNT) {
if (verbose & ~VERBOSE_COUNT)
if (ret) {
if (errno == ENODATA && d != NULL) {
- /* We need to "fake" the "use the default" values
- * since the lmm struct is zeroed out at this point.
- * The magic needs to be set in order to satisfy
- * a check later on in the code path.
- * The object_seq needs to be set for the "(Default)"
- * prefix to be displayed. */
- struct lov_user_md *lmm = ¶m->lmd->lmd_lmm;
- lmm->lmm_magic = LOV_MAGIC_V1;
- if (!param->raw)
- lmm->lmm_object_seq = FID_SEQ_LOV_DEFAULT;
- lmm->lmm_stripe_count = 0;
- lmm->lmm_stripe_size = 0;
- lmm->lmm_stripe_offset = -1;
- goto dump;
-
+ /* We need to "fake" the "use the default" values
+ * since the lmm struct is zeroed out at this point.
+ * The magic needs to be set in order to satisfy
+ * a check later on in the code path.
+ * The object_seq needs to be set for the "(Default)"
+ * prefix to be displayed. */
+ struct lov_user_md *lmm = ¶m->lmd->lmd_lmm;
+ lmm->lmm_magic = LOV_MAGIC_V1;
+ if (!param->raw)
+ lmm->lmm_oi.oi_seq = FID_SEQ_LOV_DEFAULT;
+ lmm->lmm_stripe_count = 0;
+ lmm->lmm_stripe_size = 0;
+ lmm->lmm_stripe_offset = -1;
+ goto dump;
} else if (errno == ENODATA && parent != NULL) {
if (!param->obduuid && !param->mdtuuid)
llapi_printf(LLAPI_MSG_NORMAL,
reset_lsmb (lsmb);
- lsm->lsm_object_id = strtoull (string, &end, 0);
- if (end == string)
- return (-1);
- string = end;
+ lsm->lsm_oi.oi_id = strtoull(string, &end, 0);
+ if (end == string)
+ return -1;
+ string = end;
if (*string == 0)
return (0);
return CMD_HELP;
}
- if (argc < 5) {
- reset_lsmb (&lsm_buffer); /* will set default */
- } else {
- rc = parse_lsm (&lsm_buffer, argv[4]);
- if (rc != 0) {
- fprintf(stderr, "error: %s: invalid lsm '%s'\n",
- jt_cmdname(argv[0]), argv[4]);
- return CMD_HELP;
- }
- base_id = lsm_buffer.lsm.lsm_object_id;
- valid_lsm = 1;
- }
+ if (argc < 5) {
+ reset_lsmb(&lsm_buffer); /* will set default */
+ } else {
+ rc = parse_lsm(&lsm_buffer, argv[4]);
+ if (rc != 0) {
+ fprintf(stderr, "error: %s: invalid lsm '%s'\n",
+ jt_cmdname(argv[0]), argv[4]);
+ return CMD_HELP;
+ }
+ base_id = ostid_id(&lsm_buffer.lsm.lsm_oi);
+ valid_lsm = 1;
+ }
printf("%s: "LPD64" objects\n", jt_cmdname(argv[0]), count);
gettimeofday(&next_time, NULL);
CHECK_STRUCT(lov_mds_md_v1);
CHECK_MEMBER(lov_mds_md_v1, lmm_magic);
CHECK_MEMBER(lov_mds_md_v1, lmm_pattern);
- CHECK_MEMBER(lov_mds_md_v1, lmm_object_id);
- CHECK_MEMBER(lov_mds_md_v1, lmm_object_seq);
+ CHECK_MEMBER(lov_mds_md_v1, lmm_oi);
CHECK_MEMBER(lov_mds_md_v1, lmm_stripe_size);
CHECK_MEMBER(lov_mds_md_v1, lmm_stripe_count);
CHECK_MEMBER(lov_mds_md_v1, lmm_layout_gen);
CHECK_STRUCT(lov_mds_md_v3);
CHECK_MEMBER(lov_mds_md_v3, lmm_magic);
CHECK_MEMBER(lov_mds_md_v3, lmm_pattern);
- CHECK_MEMBER(lov_mds_md_v3, lmm_object_id);
- CHECK_MEMBER(lov_mds_md_v3, lmm_object_seq);
+ CHECK_MEMBER(lov_mds_md_v3, lmm_oi);
CHECK_MEMBER(lov_mds_md_v3, lmm_stripe_size);
CHECK_MEMBER(lov_mds_md_v3, lmm_stripe_count);
CHECK_MEMBER(lov_mds_md_v3, lmm_layout_gen);
return ret;
}
+
void lustre_assert_wire_constants(void)
{
/* Wire protocol assertions generated by 'wirecheck'
* (make -C lustre/utils newwiretest)
- * running on Linux mercury 2.6.32-279.5.1.el6_lustre.x86_64 #1 SMP Tue Aug 21 00:00:41 PDT 2
+ * running on Linux testnode 2.6.32-279.5.1.el6_lustre.g53f705f.x86_64 #1 SMP Mon Oct 8 05:12
* with gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) */
/* Checks for struct lov_ost_data_v1 */
LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, "found %lld\n",
(long long)(int)sizeof(struct lov_ost_data_v1));
- LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_id) == 0, "found %lld\n",
- (long long)(int)offsetof(struct lov_ost_data_v1, l_object_id));
- LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id));
- LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_seq) == 8, "found %lld\n",
- (long long)(int)offsetof(struct lov_ost_data_v1, l_object_seq));
- LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_seq) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_seq));
+ LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_oi.oi_id) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_oi.oi_id));
+ LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_oi.oi_id) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_oi.oi_id));
+ LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_oi.oi_seq) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_oi.oi_seq));
+ LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_oi.oi_seq) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_oi.oi_seq));
LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_gen) == 16, "found %lld\n",
(long long)(int)offsetof(struct lov_ost_data_v1, l_ost_gen));
LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen) == 4, "found %lld\n",
(long long)(int)offsetof(struct lov_mds_md_v1, lmm_pattern));
LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern) == 4, "found %lld\n",
(long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern));
- LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_id) == 8, "found %lld\n",
- (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_id));
- LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id));
- LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_seq) == 16, "found %lld\n",
- (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_seq));
- LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_seq) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_seq));
+ LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_oi) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lov_mds_md_v1, lmm_oi));
+ LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_oi) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_oi));
LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_size) == 24, "found %lld\n",
(long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_size));
LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size) == 4, "found %lld\n",
(long long)(int)offsetof(struct lov_mds_md_v3, lmm_pattern));
LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pattern) == 4, "found %lld\n",
(long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pattern));
- LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_object_id) == 8, "found %lld\n",
- (long long)(int)offsetof(struct lov_mds_md_v3, lmm_object_id));
- LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_object_id) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_object_id));
- LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_object_seq) == 16, "found %lld\n",
- (long long)(int)offsetof(struct lov_mds_md_v3, lmm_object_seq));
- LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_object_seq) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_object_seq));
+ LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_oi) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lov_mds_md_v3, lmm_oi));
+ LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_oi) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_oi));
LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_stripe_size) == 24, "found %lld\n",
(long long)(int)offsetof(struct lov_mds_md_v3, lmm_stripe_size));
LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_stripe_size) == 4, "found %lld\n",