LASSERTF(fid_is_igif(dst) || fid_ver(dst) == 0, DFID"\n", PFID(dst));
}
-/**
- * Storage representation for fids.
- *
- * Variable size, first byte contains the length of the whole record.
- */
-struct lu_fid_pack {
- char fp_len;
- char fp_area[sizeof(struct lu_fid)];
-};
-
-void fid_pack(struct lu_fid_pack *pack, const struct lu_fid *fid,
- struct lu_fid *befider);
-int fid_unpack(const struct lu_fid_pack *pack, struct lu_fid *fid);
-
static inline int fid_is_sane(const struct lu_fid *fid)
{
return
* Stored in this crazy struct for maximum packing and endian-neutrality
*/
struct link_ea_entry {
+ struct lu_fid lee_parent_fid;
/** __u16 stored big-endian, unaligned */
char lee_reclen[2];
- struct lu_fid_pack lee_parent_fid; /**< variable length */
- /** logically after lee_parent_fid; don't use directly */
+ __u16 lee_padding;
char lee_name[0];
-};
+}__attribute__((packed));
/** fid2path request/reply structure */
struct getinfo_fid2path {
/** special OID for local objects */
enum {
/** \see osd_oi_index_create */
- OSD_OI_FID_SMALL_OID = 1UL,
- OSD_OI_FID_OTHER_OID = 2UL,
+ OSD_OI_FID_16_OID = 2UL,
/** \see fld_mod_init */
FLD_INDEX_OID = 3UL,
/** \see fid_mod_init */
struct md_ucred *uc = md_ucred(env);
rc = next->do_index_ops->dio_insert(env, next,
- __mdd_fid_rec(env, lf),
+ (struct dt_rec*)lf,
(const struct dt_key *)name,
handle, capa, uc->mu_cap &
CFS_CAP_SYS_RESOURCE_MASK);
struct mdd_object *mdd_obj = md2mdd_obj(pobj);
struct mdd_device *m = mdo2mdd(pobj);
struct dt_object *dir = mdd_object_child(mdd_obj);
- struct lu_fid_pack *pack = &mdd_env_info(env)->mti_pack;
int rc;
ENTRY;
dt_try_as_dir(env, dir))) {
rc = dir->do_index_ops->dio_lookup(env, dir,
- (struct dt_rec *)pack, key,
+ (struct dt_rec *)fid, key,
mdd_object_capa(env, mdd_obj));
if (rc > 0)
- rc = fid_unpack(pack, fid);
+ rc = 0;
else if (rc == 0)
rc = -ENOENT;
} else
/** Pack a link_ea_entry.
* All elements are stored as chars to avoid alignment issues.
* Numbers are always big-endian
- * \param packbuf is a temp fid buffer
* \retval record length
*/
static int mdd_lee_pack(struct link_ea_entry *lee, const struct lu_name *lname,
- const struct lu_fid *pfid, struct lu_fid* packbuf)
+ const struct lu_fid *pfid)
{
- char *ptr;
int reclen;
- fid_pack(&lee->lee_parent_fid, pfid, packbuf);
- ptr = (char *)&lee->lee_parent_fid + lee->lee_parent_fid.fp_len;
- strncpy(ptr, lname->ln_name, lname->ln_namelen);
- reclen = lee->lee_parent_fid.fp_len + lname->ln_namelen +
- sizeof(lee->lee_reclen);
+ fid_cpu_to_be(&lee->lee_parent_fid, pfid);
+ strncpy(lee->lee_name, lname->ln_name, lname->ln_namelen);
+ reclen = sizeof(struct link_ea_entry) + lname->ln_namelen;
+
lee->lee_reclen[0] = (reclen >> 8) & 0xff;
lee->lee_reclen[1] = reclen & 0xff;
return reclen;
struct lu_name *lname, struct lu_fid *pfid)
{
*reclen = (lee->lee_reclen[0] << 8) | lee->lee_reclen[1];
- fid_unpack(&lee->lee_parent_fid, pfid);
- lname->ln_name = (char *)&lee->lee_parent_fid +
- lee->lee_parent_fid.fp_len;
- lname->ln_namelen = *reclen - lee->lee_parent_fid.fp_len -
- sizeof(lee->lee_reclen);
+ fid_be_to_cpu(pfid, &lee->lee_parent_fid);
+ lname->ln_name = lee->lee_name;
+ lname->ln_namelen = *reclen - sizeof(struct link_ea_entry);
}
/** Add a record to the end of link ea buf */
leh = buf->lb_buf;
lee = buf->lb_buf + leh->leh_len;
- reclen = mdd_lee_pack(lee, lname, pfid, &mdd_env_info(env)->mti_fid2);
+ reclen = mdd_lee_pack(lee, lname, pfid);
leh->leh_len += reclen;
leh->leh_reccount++;
return 0;
struct lu_name mti_name;
struct obdo mti_oa;
char mti_xattr_buf[LUSTRE_POSIX_ACL_MAX_SIZE];
- struct lu_fid_pack mti_pack;
struct dt_allocation_hint mti_hint;
struct lov_mds_md *mti_max_lmm;
int mti_max_lmm_size;
return lu_object_fid(&obj->mod_obj.mo_lu);
}
-static inline const struct dt_rec *__mdd_fid_rec(const struct lu_env *env,
- const struct lu_fid *fid)
-{
- struct lu_fid_pack *pack = &mdd_env_info(env)->mti_pack;
-
- fid_pack(pack, fid, &mdd_env_info(env)->mti_fid2);
- return (const struct dt_rec *)pack;
-}
-
static inline umode_t mdd_object_type(const struct mdd_object *obj)
{
return lu_object_attr(&obj->mod_obj.mo_lu);
ENTRY;
return dor->do_index_ops->dio_insert(env, dor,
- __mdd_fid_rec(env, lf),
+ (struct dt_rec *)lf,
key, th,
BYPASS_CAPA, 1);
}
dotdot, th, BYPASS_CAPA);
next->do_index_ops->dio_insert(env, next,
- __mdd_fid_rec(env, lf_dor),
+ (struct dt_rec *) lf_dor,
dotdot, th, BYPASS_CAPA, 1);
out:
struct dt_thread_info {
char dti_buf[DT_MAX_PATH];
- struct lu_fid_pack dti_pack;
struct dt_find_hint dti_dfh;
};
static int dt_lookup(const struct lu_env *env, struct dt_object *dir,
const char *name, struct lu_fid *fid)
{
- struct dt_thread_info *info = lu_context_key_get(&env->le_ctx,
- &dt_key);
- struct lu_fid_pack *pack = &info->dti_pack;
- struct dt_rec *rec = (struct dt_rec *)pack;
+ struct dt_rec *rec = (struct dt_rec *)fid;
const struct dt_key *key = (const struct dt_key *)name;
int result;
result = dir->do_index_ops->dio_lookup(env, dir, rec, key,
BYPASS_CAPA);
if (result > 0)
- result = fid_unpack(pack, fid);
+ result = 0;
else if (result == 0)
result = -ENOENT;
} else
}
EXPORT_SYMBOL(lu_site_stats_print);
-#ifdef __KERNEL__
-/*
- * XXX: Functions below logically belong to the fid module, but they are used
- * by dt_store_open(). Put them here until better place is found.
- */
-
-void fid_pack(struct lu_fid_pack *pack, const struct lu_fid *fid,
- struct lu_fid *befider)
-{
- int recsize;
- __u64 seq;
- __u32 oid;
-
- seq = fid_seq(fid);
- oid = fid_oid(fid);
-
- /*
- * Two cases: compact 6 bytes representation for a common case, and
- * full 17 byte representation for "unusual" fid.
- */
-
- /*
- * Check that usual case is really usual.
- */
- CLASSERT(LUSTRE_SEQ_MAX_WIDTH < 0xffffull);
-
- /* fid can be packed in six bytes (first byte as length of packed fid,
- * three bytes of seq and two bytes of oid).
- * this reduces IO overhead specially for OSD Object Index. */
-
- if (seq < FID_SEQ_START ||
- seq > (0xffffffull + FID_SEQ_START) ||
- oid > 0xffff || fid_ver(fid) != 0) {
- fid_cpu_to_be(befider, fid);
- recsize = sizeof *befider;
- } else {
- unsigned char *small_befider;
-
- /* as lower 24 bits of FID_SEQ_START are zero, no need to
- * subtract its value from seq */
-
- CLASSERT((FID_SEQ_START & 0xffffff) == 0);
-
- small_befider = (unsigned char *)befider;
-
- small_befider[0] = seq >> 16;
- small_befider[1] = seq >> 8;
- small_befider[2] = seq;
-
- small_befider[3] = oid >> 8;
- small_befider[4] = oid;
-
- recsize = 5;
- }
- memcpy(pack->fp_area, befider, recsize);
- pack->fp_len = recsize + 1;
-}
-EXPORT_SYMBOL(fid_pack);
-
-int fid_unpack(const struct lu_fid_pack *pack, struct lu_fid *fid)
-{
- int result;
-
- result = 0;
- switch (pack->fp_len) {
- case sizeof *fid + 1:
- memcpy(fid, pack->fp_area, sizeof *fid);
- fid_be_to_cpu(fid, fid);
- break;
- case 6: {
- const unsigned char *area;
-
- area = (unsigned char *)pack->fp_area;
- fid->f_seq = (area[0] << 16) | (area[1] << 8) | area[2];
- fid->f_seq += FID_SEQ_START;
- fid->f_oid = (area[3] << 8) | area[4];
- fid->f_ver = 0;
- break;
- }
- default:
- CERROR("Unexpected packed fid size: %d\n", pack->fp_len);
- result = -EIO;
- }
- return result;
-}
-EXPORT_SYMBOL(fid_unpack);
-#endif /* #ifdef __KERNEL__ */
-
const char *lu_time_names[LU_TIME_NR] = {
[LU_TIME_FIND_LOOKUP] = "find_lookup",
[LU_TIME_FIND_ALLOC] = "find_alloc",
*/
result = iam_lvar_create(obj->oo_inode, OSD_NAME_LEN, 4,
- sizeof (struct lu_fid_pack),
+ sizeof (struct osd_fid_pack),
oth->ot_handle);
}
return result;
/**
* Helper function to pack the fid
*/
-static inline void osd_fid_pack(const struct lu_env *env, const struct lu_fid *fid,
- struct dt_rec *pack)
+void osd_fid_pack(struct osd_fid_pack *pack, const struct dt_rec *fid,
+ struct lu_fid *befider)
{
- fid_pack((struct lu_fid_pack *)pack, fid, &osd_oti_get(env)->oti_fid);
+ fid_cpu_to_be(befider, (struct lu_fid *)fid);
+ memcpy(pack->fp_area, befider, sizeof(*befider));
+ pack->fp_len = sizeof(*befider) + 1;
+}
+
+int osd_fid_unpack(struct lu_fid *fid, const struct osd_fid_pack *pack)
+{
+ int result;
+
+ result = 0;
+ switch (pack->fp_len) {
+ case sizeof *fid + 1:
+ memcpy(fid, pack->fp_area, sizeof *fid);
+ fid_be_to_cpu(fid, fid);
+ break;
+ default:
+ CERROR("Unexpected packed fid size: %d\n", pack->fp_len);
+ result = -EIO;
+ }
+ return result;
}
/**
descr = o->oo_dir->od_container.ic_descr;
if (feat == &dt_directory_features) {
- if (descr->id_rec_size == sizeof(struct lu_fid_pack))
+ if (descr->id_rec_size == sizeof(struct osd_fid_pack))
return 1;
else
return 0;
struct iam_container *bag = &obj->oo_dir->od_container;
struct osd_thread_info *oti = osd_oti_get(env);
struct iam_iterator *it = &oti->oti_idx_it;
+ struct iam_rec *iam_rec;
int rc;
ENTRY;
iam_it_init(it, bag, 0, ipd);
rc = iam_it_get(it, (struct iam_key *)key);
- if (rc >= 0)
- iam_reccpy(&it->ii_path.ip_leaf, (struct iam_rec *)rec);
+ if (rc >= 0) {
+ if (S_ISDIR(obj->oo_inode->i_mode))
+ iam_rec = (struct iam_rec *)oti->oti_fid_packed;
+ else
+ iam_rec = (struct iam_rec *) rec;
+ iam_reccpy(&it->ii_path.ip_leaf, (struct iam_rec *)iam_rec);
+ if (S_ISDIR(obj->oo_inode->i_mode))
+ osd_fid_unpack((struct lu_fid *) rec,
+ (struct osd_fid_pack *)iam_rec);
+ }
iam_it_put(it);
iam_it_fini(it);
osd_ipd_put(env, bag, ipd);
#ifdef HAVE_QUOTA_SUPPORT
cfs_cap_t save = current->cap_effective;
#endif
+ struct osd_thread_info *oti = osd_oti_get(env);
+ struct iam_rec *iam_rec = (struct iam_rec *)oti->oti_fid_packed;
int rc;
ENTRY;
else
current->cap_effective &= ~CFS_CAP_SYS_RESOURCE_MASK;
#endif
+ if (S_ISDIR(obj->oo_inode->i_mode))
+ osd_fid_pack((struct osd_fid_pack *)iam_rec, rec, &oti->oti_fid);
+ else
+ iam_rec = (struct iam_rec *) rec;
rc = iam_insert(oh->ot_handle, bag, (const struct iam_key *)key,
- (struct iam_rec *)rec, ipd);
+ iam_rec, ipd);
#ifdef HAVE_QUOTA_SUPPORT
current->cap_effective = save;
#endif
struct dt_rec *rec, const struct dt_key *key)
{
struct inode *dir = obj->oo_inode;
- struct osd_thread_info *info = osd_oti_get(env);
struct dentry *dentry;
struct ldiskfs_dir_entry_2 *de;
struct buffer_head *bh;
- struct lu_fid *fid = &info->oti_fid;
+ struct lu_fid *fid = (struct lu_fid *) rec;
int ino;
int rc;
ino = le32_to_cpu(de->inode);
brelse(bh);
rc = osd_ea_fid_get(env, obj, ino, fid);
- if (rc == 0)
- osd_fid_pack(env, fid, rec);
} else
rc = -ENOENT;
struct lustre_capa *capa, int ignore_quota)
{
struct osd_object *obj = osd_dt_obj(dt);
- struct lu_fid *fid = &osd_oti_get(env)->oti_fid;
- const struct lu_fid_pack *pack = (const struct lu_fid_pack *)rec;
+ struct lu_fid *fid = (struct lu_fid *) rec;
const char *name = (const char *)key;
struct osd_object *child;
#ifdef HAVE_QUOTA_SUPPORT
if (osd_object_auth(env, dt, capa, CAPA_OPC_INDEX_INSERT))
RETURN(-EACCES);
- rc = fid_unpack(pack, fid);
- if (rc != 0)
- RETURN(rc);
child = osd_object_find(env, dt, fid);
if (!IS_ERR(child)) {
struct inode *inode = obj->oo_inode;
struct osd_it_iam *it = (struct osd_it_iam *)di;
struct osd_thread_info *info = osd_oti_get(env);
struct lu_fid *fid = &info->oti_fid;
- const struct lu_fid_pack *rec;
+ const struct osd_fid_pack *rec;
char *name;
int namelen;
__u64 hash;
namelen = iam_it_key_size(&it->oi_it);
- rec = (const struct lu_fid_pack *) iam_it_rec_get(&it->oi_it);
+ rec = (const struct osd_fid_pack *) iam_it_rec_get(&it->oi_it);
if (IS_ERR(rec))
RETURN(PTR_ERR(rec));
- rc = fid_unpack(rec, fid);
+ rc = osd_fid_unpack(fid, rec);
if (rc)
RETURN(rc);
it->oie_file.f_op = obj->oo_inode->i_fop;
it->oie_file.private_data = NULL;
lu_object_get(lo);
- RETURN((struct dt_it*) it);
+ RETURN((struct dt_it *) it);
}
/**
__u32 od_iop_mode;
};
+/**
+ * Storage representation for fids.
+ *
+ * Variable size, first byte contains the length of the whole record.
+ */
+struct osd_fid_pack {
+ unsigned char fp_len;
+ char fp_area[sizeof(struct lu_fid)];
+};
+
struct osd_it_ea_dirent {
__u64 oied_ino;
__u64 oied_off;
struct lustre_capa_key oti_capa_key;
struct lustre_capa oti_capa;
- struct lu_fid_pack oti_pack;
-
/**
* following ipd and it structures are used for osd_index_iam_lookup()
* these are defined separately as we might do index operation
struct osd_ctxt oti_ctxt;
#endif
struct lu_env oti_obj_delete_tx_env;
+#define OSD_FID_REC_SZ 32
+ char oti_fid_packed[OSD_FID_REC_SZ];
};
#ifdef LPROCFS
};
static const struct oi_descr oi_descr[OSD_OI_FID_NR] = {
- [OSD_OI_FID_SMALL] = {
- .fid_size = 5,
- .name = "oi.5",
- .oid = OSD_OI_FID_SMALL_OID
- },
- [OSD_OI_FID_OTHER] = {
+ [OSD_OI_FID_16] = {
.fid_size = sizeof(struct lu_fid),
.name = "oi.16",
- .oid = OSD_OI_FID_OTHER_OID
+ .oid = OSD_OI_FID_16_OID
}
};
int rc;
int i;
- CLASSERT(ARRAY_SIZE(oi->oi_dir) == ARRAY_SIZE(oi_descr));
-
env = info->oti_env;
mutex_lock(&oi_init_lock);
memset(oi, 0, sizeof *oi);
rc = obj->do_ops->do_index_try(env, obj, &oi_feat);
if (rc == 0) {
LASSERT(obj->do_index_ops != NULL);
- oi->oi_dir[i] = obj;
+ oi->oi_dir = obj;
} else {
CERROR("Wrong index \"%s\": %d\n", name, rc);
lu_object_put(env, &obj->do_lu);
void osd_oi_fini(struct osd_thread_info *info, struct osd_oi *oi)
{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(oi->oi_dir); ++i) {
- if (oi->oi_dir[i] != NULL) {
- lu_object_put(info->oti_env, &oi->oi_dir[i]->do_lu);
- oi->oi_dir[i] = NULL;
- }
- }
-}
-
-static const struct dt_key *oi_fid_key(struct osd_thread_info *info,
- struct osd_oi *oi,
- const struct lu_fid *fid,
- struct dt_object **idx)
-{
- int i;
- struct lu_fid_pack *pack;
-
- pack = &info->oti_pack;
- fid_pack(pack, fid, &info->oti_fid);
- for (i = 0; i < ARRAY_SIZE(oi->oi_dir); ++i) {
- if (pack->fp_len == oi_descr[i].fid_size + sizeof pack->fp_len){
- *idx = oi->oi_dir[i];
- return (const struct dt_key *)&pack->fp_area;
- }
+ if (oi->oi_dir != NULL) {
+ lu_object_put(info->oti_env, &oi->oi_dir->do_lu);
+ oi->oi_dir = NULL;
}
- CERROR("Unsupported packed fid size: %d ("DFID")\n",
- pack->fp_len, PFID(fid));
- LBUG();
- return NULL;
}
static inline int fid_is_oi_fid(const struct lu_fid *fid)
* oi-index create operation.
*/
return (unlikely(fid_seq(fid) == FID_SEQ_LOCAL_FILE &&
- (fid_oid(fid) == OSD_OI_FID_SMALL_OID ||
- fid_oid(fid) == OSD_OI_FID_OTHER_OID)));
+ fid_oid(fid) == OSD_OI_FID_16_OID));
}
int osd_oi_lookup(struct osd_thread_info *info, struct osd_oi *oi,
const struct lu_fid *fid, struct osd_inode_id *id)
{
+ struct lu_fid *oi_fid = &info->oti_fid;
int rc;
if (fid_is_igif(fid)) {
if (fid_is_oi_fid(fid))
return -ENOENT;
- key = oi_fid_key(info, oi, fid, &idx);
+ idx = oi->oi_dir;
+ fid_cpu_to_be(oi_fid, fid);
+ key = (struct dt_key *) oi_fid;
rc = idx->do_index_ops->dio_lookup(info->oti_env, idx,
(struct dt_rec *)id, key,
BYPASS_CAPA);
const struct lu_fid *fid, const struct osd_inode_id *id0,
struct thandle *th, int ignore_quota)
{
+ struct lu_fid *oi_fid = &info->oti_fid;
struct dt_object *idx;
struct osd_inode_id *id;
const struct dt_key *key;
if (fid_is_oi_fid(fid))
return 0;
- key = oi_fid_key(info, oi, fid, &idx);
+ idx = oi->oi_dir;
+ fid_cpu_to_be(oi_fid, fid);
+ key = (struct dt_key *) oi_fid;
+
id = &info->oti_id;
id->oii_ino = cpu_to_be32(id0->oii_ino);
id->oii_gen = cpu_to_be32(id0->oii_gen);
return idx->do_index_ops->dio_insert(info->oti_env, idx,
- (const struct dt_rec *)id,
+ (struct dt_rec *)id,
key, th, BYPASS_CAPA,
ignore_quota);
}
struct osd_oi *oi, const struct lu_fid *fid,
struct thandle *th)
{
+ struct lu_fid *oi_fid = &info->oti_fid;
struct dt_object *idx;
const struct dt_key *key;
if (fid_is_igif(fid))
return 0;
- key = oi_fid_key(info, oi, fid, &idx);
+ idx = oi->oi_dir;
+ fid_cpu_to_be(oi_fid, fid);
+ key = (struct dt_key *) oi_fid;
return idx->do_index_ops->dio_delete(info->oti_env, idx,
key, th, BYPASS_CAPA);
}
struct dt_device;
enum {
- OSD_OI_FID_SMALL,
- OSD_OI_FID_OTHER,
+ OSD_OI_FID_16,
OSD_OI_FID_NR
};
/*
* underlying index object, where fid->id mapping in stored.
*/
- struct dt_object *oi_dir[OSD_OI_FID_NR];
+ struct dt_object *oi_dir;
};
/*
LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, " found %lld\n",
(long long)(int)sizeof(((struct ll_fid *)0)->f_type));
- /* Checks for struct lu_fid_pack */
- LASSERTF((int)sizeof(struct lu_fid_pack) == 17, " found %lld\n",
- (long long)(int)sizeof(struct lu_fid_pack));
- LASSERTF((int)offsetof(struct lu_fid_pack, fp_len) == 0, " found %lld\n",
- (long long)(int)offsetof(struct lu_fid_pack, fp_len));
- LASSERTF((int)sizeof(((struct lu_fid_pack *)0)->fp_len) == 1, " found %lld\n",
- (long long)(int)sizeof(((struct lu_fid_pack *)0)->fp_len));
- LASSERTF((int)offsetof(struct lu_fid_pack, fp_area) == 1, " found %lld\n",
- (long long)(int)offsetof(struct lu_fid_pack, fp_area));
- LASSERTF((int)sizeof(((struct lu_fid_pack *)0)->fp_area) == 16, " found %lld\n",
- (long long)(int)sizeof(((struct lu_fid_pack *)0)->fp_area));
-
/* Checks for struct mds_status_req */
LASSERTF((int)sizeof(struct mds_status_req) == 8, " found %lld\n",
(long long)(int)sizeof(struct mds_status_req));
(long long)(int)sizeof(((struct link_ea_header *)0)->padding2));
/* Checks for struct link_ea_entry */
- LASSERTF((int)sizeof(struct link_ea_entry) == 19, " found %lld\n",
+ LASSERTF((int)sizeof(struct link_ea_entry) == 20, " found %lld\n",
(long long)(int)sizeof(struct link_ea_entry));
- LASSERTF((int)offsetof(struct link_ea_entry, lee_reclen) == 0, " found %lld\n",
+ LASSERTF((int)offsetof(struct link_ea_entry, lee_parent_fid) == 0, " found %lld\n",
+ (long long)(int)offsetof(struct link_ea_entry, lee_parent_fid));
+ LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid) == 16, " found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid));
+ LASSERTF((int)offsetof(struct link_ea_entry, lee_reclen) == 16, " found %lld\n",
(long long)(int)offsetof(struct link_ea_entry, lee_reclen));
LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_reclen) == 2, " found %lld\n",
(long long)(int)sizeof(((struct link_ea_entry *)0)->lee_reclen));
- LASSERTF((int)offsetof(struct link_ea_entry, lee_parent_fid) == 2, " found %lld\n",
- (long long)(int)offsetof(struct link_ea_entry, lee_parent_fid));
- LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid) == 17, " found %lld\n",
- (long long)(int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid));
- LASSERTF((int)offsetof(struct link_ea_entry, lee_name) == 19, " found %lld\n",
+ LASSERTF((int)offsetof(struct link_ea_entry, lee_name) == 20, " found %lld\n",
(long long)(int)offsetof(struct link_ea_entry, lee_name));
LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_name) == 0, " found %lld\n",
(long long)(int)sizeof(((struct link_ea_entry *)0)->lee_name));
}
-
LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, " found %lld\n",
(long long)(int)sizeof(((struct ll_fid *)0)->f_type));
- /* Checks for struct lu_fid_pack */
- LASSERTF((int)sizeof(struct lu_fid_pack) == 17, " found %lld\n",
- (long long)(int)sizeof(struct lu_fid_pack));
- LASSERTF((int)offsetof(struct lu_fid_pack, fp_len) == 0, " found %lld\n",
- (long long)(int)offsetof(struct lu_fid_pack, fp_len));
- LASSERTF((int)sizeof(((struct lu_fid_pack *)0)->fp_len) == 1, " found %lld\n",
- (long long)(int)sizeof(((struct lu_fid_pack *)0)->fp_len));
- LASSERTF((int)offsetof(struct lu_fid_pack, fp_area) == 1, " found %lld\n",
- (long long)(int)offsetof(struct lu_fid_pack, fp_area));
- LASSERTF((int)sizeof(((struct lu_fid_pack *)0)->fp_area) == 16, " found %lld\n",
- (long long)(int)sizeof(((struct lu_fid_pack *)0)->fp_area));
-
/* Checks for struct mds_status_req */
LASSERTF((int)sizeof(struct mds_status_req) == 8, " found %lld\n",
(long long)(int)sizeof(struct mds_status_req));
(long long)(int)sizeof(((struct link_ea_header *)0)->padding2));
/* Checks for struct link_ea_entry */
- LASSERTF((int)sizeof(struct link_ea_entry) == 19, " found %lld\n",
+ LASSERTF((int)sizeof(struct link_ea_entry) == 20, " found %lld\n",
(long long)(int)sizeof(struct link_ea_entry));
- LASSERTF((int)offsetof(struct link_ea_entry, lee_reclen) == 0, " found %lld\n",
+ LASSERTF((int)offsetof(struct link_ea_entry, lee_parent_fid) == 0, " found %lld\n",
+ (long long)(int)offsetof(struct link_ea_entry, lee_parent_fid));
+ LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid) == 16, " found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid));
+ LASSERTF((int)offsetof(struct link_ea_entry, lee_reclen) == 16, " found %lld\n",
(long long)(int)offsetof(struct link_ea_entry, lee_reclen));
LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_reclen) == 2, " found %lld\n",
(long long)(int)sizeof(((struct link_ea_entry *)0)->lee_reclen));
- LASSERTF((int)offsetof(struct link_ea_entry, lee_parent_fid) == 2, " found %lld\n",
- (long long)(int)offsetof(struct link_ea_entry, lee_parent_fid));
- LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid) == 17, " found %lld\n",
- (long long)(int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid));
- LASSERTF((int)offsetof(struct link_ea_entry, lee_name) == 19, " found %lld\n",
+ LASSERTF((int)offsetof(struct link_ea_entry, lee_name) == 20, " found %lld\n",
(long long)(int)offsetof(struct link_ea_entry, lee_name));
LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_name) == 0, " found %lld\n",
(long long)(int)sizeof(((struct link_ea_entry *)0)->lee_name));