From a4b5304ae5542373de4ad1f2bca193dfb95ef7ff Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Wed, 26 Jul 2023 18:17:47 +0800 Subject: [PATCH] LU-16837 lustre: avoid the same member name There are several structures using the same member name, such as cl_ladvise_io::li_flags, layout_intent::li_flags and lfsck_instance::li_flags, and this makes it hard to find where it is used. This patch renames some structures member prefix to avoid the homonyms. Test-Parameters: trivial Signed-off-by: Bobi Jam Change-Id: Ie592afa06dd0abf0c1110843e5d8007a91c68145 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51766 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin --- contrib/scripts/spelling.txt | 6 +++++ lustre/include/cl_object.h | 10 ++++---- lustre/include/uapi/linux/lustre/lustre_idl.h | 6 ++--- lustre/llite/file.c | 22 ++++++++-------- lustre/lod/lod_object.c | 36 +++++++++++++-------------- lustre/lov/lov_io.c | 14 +++++------ lustre/mdd/mdd_object.c | 12 ++++----- lustre/mdt/mdt_handler.c | 10 ++++---- lustre/osc/osc_io.c | 14 +++++------ lustre/ptlrpc/pack_generic.c | 6 ++--- lustre/ptlrpc/wiretest.c | 24 +++++++++--------- lustre/utils/wirecheck.c | 6 ++--- lustre/utils/wiretest.c | 24 +++++++++--------- 13 files changed, 98 insertions(+), 92 deletions(-) diff --git a/contrib/scripts/spelling.txt b/contrib/scripts/spelling.txt index b4b0a41..eda5ee7 100644 --- a/contrib/scripts/spelling.txt +++ b/contrib/scripts/spelling.txt @@ -66,6 +66,12 @@ ldlm_side_t||enum ldlm_side ldlm_type_t||enum ldlm_type ldlm_wire_policy_data_t||union ldlm_wire_policy_data libcfs_debug_vmsg2||libcfs_debug_msg +li_advice||lio_advice +li_end||lio_end +li_extent||lai_extent +li_fid||lio_fid +li_opc||lai_opc +li_start||lio_start lnet_acceptor_connreq_t||struct lnet_acceptor_connreq lnet_counters_t||struct lnet_counters lnet_handle_wire_t||struct lnet_handle_wire diff --git a/lustre/include/cl_object.h b/lustre/include/cl_object.h index 4b34ba1..c6444c7 100644 --- a/lustre/include/cl_object.h +++ b/lustre/include/cl_object.h @@ -1845,12 +1845,12 @@ struct cl_io { unsigned int fi_nr_written; } ci_fsync; struct cl_ladvise_io { - __u64 li_start; - __u64 li_end; + __u64 lio_start; + __u64 lio_end; /** file system level fid */ - struct lu_fid *li_fid; - enum lu_ladvise_type li_advice; - __u64 li_flags; + struct lu_fid *lio_fid; + enum lu_ladvise_type lio_advice; + __u64 lio_flags; } ci_ladvise; struct cl_lseek_io { loff_t ls_start; diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index a1cf4a8..c54c4c5 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -3395,9 +3395,9 @@ enum layout_intent_opc { /* enqueue layout lock with intent */ struct layout_intent { - __u32 li_opc; /* intent operation for enqueue, read, write etc */ - __u32 li_flags; - struct lu_extent li_extent; + __u32 lai_opc; /* intent operation for enqueue, read, write etc */ + __u32 lai_flags; + struct lu_extent lai_extent; } __attribute__((packed)); /** diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 1914e02..ddaedaf 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -3796,11 +3796,11 @@ static int ll_ladvise(struct inode *inode, struct file *file, __u64 flags, /* initialize parameters for ladvise */ lio = &io->u.ci_ladvise; - lio->li_start = ladvise->lla_start; - lio->li_end = ladvise->lla_end; - lio->li_fid = ll_inode2fid(inode); - lio->li_advice = ladvise->lla_advice; - lio->li_flags = flags; + lio->lio_start = ladvise->lla_start; + lio->lio_end = ladvise->lla_end; + lio->lio_fid = ll_inode2fid(inode); + lio->lio_advice = ladvise->lla_advice; + lio->lio_flags = flags; if (cl_io_init(env, io, CIT_LADVISE, io->ci_obj) == 0) rc = cl_io_loop(env, io); @@ -6285,8 +6285,8 @@ static int ll_layout_intent(struct inode *inode, struct layout_intent *intent) memset(&it, 0, sizeof(it)); it.it_op = IT_LAYOUT; - if (intent->li_opc == LAYOUT_INTENT_WRITE || - intent->li_opc == LAYOUT_INTENT_TRUNC) + if (intent->lai_opc == LAYOUT_INTENT_WRITE || + intent->lai_opc == LAYOUT_INTENT_TRUNC) it.it_flags = FMODE_WRITE; LDLM_DEBUG_NOLOCK("%s: requeue layout lock for file "DFID"(%p)", @@ -6328,7 +6328,7 @@ int ll_layout_refresh(struct inode *inode, __u32 *gen) struct ll_sb_info *sbi = ll_i2sbi(inode); struct lustre_handle lockh; struct layout_intent intent = { - .li_opc = LAYOUT_INTENT_ACCESS, + .lai_opc = LAYOUT_INTENT_ACCESS, }; enum ldlm_mode mode; int rc; @@ -6387,9 +6387,9 @@ int ll_layout_write_intent(struct inode *inode, enum layout_intent_opc opc, struct lu_extent *ext) { struct layout_intent intent = { - .li_opc = opc, - .li_extent.e_start = ext->e_start, - .li_extent.e_end = ext->e_end, + .lai_opc = opc, + .lai_extent.e_start = ext->e_start, + .lai_extent.e_end = ext->e_end, }; int rc; ENTRY; diff --git a/lustre/lod/lod_object.c b/lustre/lod/lod_object.c index 7491099..19cdd6c 100644 --- a/lustre/lod/lod_object.c +++ b/lustre/lod/lod_object.c @@ -7582,22 +7582,22 @@ static int lod_declare_update_plain(const struct lu_env *env, lod_comp = &lo->ldo_comp_entries[lo->ldo_comp_cnt - 1]; if (lo->ldo_comp_cnt > 1 && lod_comp->llc_extent.e_end != OBD_OBJECT_EOF && - lod_comp->llc_extent.e_end < layout->li_extent.e_end) { + lod_comp->llc_extent.e_end < layout->lai_extent.e_end) { CDEBUG_LIMIT(replay ? D_ERROR : D_LAYOUT, "%s: the defined layout [0, %#llx) does not " "covers the write range "DEXT"\n", lod2obd(d)->obd_name, lod_comp->llc_extent.e_end, - PEXT(&layout->li_extent)); + PEXT(&layout->lai_extent)); GOTO(out, rc = -EINVAL); } CDEBUG(D_LAYOUT, "%s: "DFID": update components "DEXT"\n", lod2obd(d)->obd_name, PFID(lod_object_fid(lo)), - PEXT(&layout->li_extent)); + PEXT(&layout->lai_extent)); if (!replay) { - rc = lod_declare_update_extents(env, lo, &layout->li_extent, - th, 0, layout->li_opc == LAYOUT_INTENT_WRITE); + rc = lod_declare_update_extents(env, lo, &layout->lai_extent, + th, 0, layout->lai_opc == LAYOUT_INTENT_WRITE); if (rc < 0) GOTO(out, rc); else if (rc) @@ -7611,7 +7611,7 @@ static int lod_declare_update_plain(const struct lu_env *env, for (i = 0; i < lo->ldo_comp_cnt; i++) { lod_comp = &lo->ldo_comp_entries[i]; - if (lod_comp->llc_extent.e_start >= layout->li_extent.e_end) + if (lod_comp->llc_extent.e_start >= layout->lai_extent.e_end) break; if (!replay) { @@ -8178,7 +8178,7 @@ static int lod_declare_update_pccro(const struct lu_env *env, struct layout_intent *intent = mlc->mlc_intent; int rc; - switch (intent->li_opc) { + switch (intent->lai_opc) { case LAYOUT_INTENT_PCCRO_SET: rc = lod_declare_pccro_set(env, dt, th); break; @@ -8211,10 +8211,10 @@ static int lod_declare_update_rdonly(const struct lu_env *env, if (mlc->mlc_opc == MD_LAYOUT_WRITE) { struct layout_intent *layout = mlc->mlc_intent; - int write = layout->li_opc == LAYOUT_INTENT_WRITE; + int write = layout->lai_opc == LAYOUT_INTENT_WRITE; int picked; - extent = layout->li_extent; + extent = layout->lai_extent; CDEBUG(D_LAYOUT, DFID": trying to write :"DEXT"\n", PFID(lod_object_fid(lo)), PEXT(&extent)); @@ -8232,7 +8232,7 @@ static int lod_declare_update_rdonly(const struct lu_env *env, if (rc < 0) GOTO(out, rc); - if (layout->li_opc == LAYOUT_INTENT_TRUNC) { + if (layout->lai_opc == LAYOUT_INTENT_TRUNC) { /** * trunc transfers [0, size) in the intent extent, we'd * stale components overlapping [size, eof). @@ -8247,7 +8247,7 @@ static int lod_declare_update_rdonly(const struct lu_env *env, GOTO(out, rc); /* restore truncate intent extent */ - if (layout->li_opc == LAYOUT_INTENT_TRUNC) + if (layout->lai_opc == LAYOUT_INTENT_TRUNC) extent.e_end = extent.e_start; /* instantiate components for the picked mirror, start from 0 */ @@ -8388,11 +8388,11 @@ static int lod_declare_update_write_pending(const struct lu_env *env, if (mlc->mlc_opc == MD_LAYOUT_WRITE) { struct layout_intent *layout = mlc->mlc_intent; - int write = layout->li_opc == LAYOUT_INTENT_WRITE; + int write = layout->lai_opc == LAYOUT_INTENT_WRITE; - LASSERT(mlc->mlc_intent != NULL); + LASSERT(layout != NULL); - extent = mlc->mlc_intent->li_extent; + extent = layout->lai_extent; CDEBUG(D_LAYOUT, DFID": intent to write: "DEXT"\n", PFID(lod_object_fid(lo)), PEXT(&extent)); @@ -8403,7 +8403,7 @@ static int lod_declare_update_write_pending(const struct lu_env *env, if (rc < 0) GOTO(out, rc); - if (mlc->mlc_intent->li_opc == LAYOUT_INTENT_TRUNC) { + if (layout->lai_opc == LAYOUT_INTENT_TRUNC) { /** * trunc transfers [0, size) in the intent extent, we'd * stale components overlapping [size, eof). @@ -8421,7 +8421,7 @@ static int lod_declare_update_write_pending(const struct lu_env *env, * instantiate [0, mlc->mlc_intent->e_end) */ /* restore truncate intent extent */ - if (mlc->mlc_intent->li_opc == LAYOUT_INTENT_TRUNC) + if (layout->lai_opc == LAYOUT_INTENT_TRUNC) extent.e_end = extent.e_start; extent.e_start = 0; @@ -9211,8 +9211,8 @@ static int lod_declare_layout_change(const struct lu_env *env, if (mlc->mlc_opc == MD_LAYOUT_WRITE) { struct layout_intent *intent = mlc->mlc_intent; - if (intent->li_opc == LAYOUT_INTENT_PCCRO_SET || - intent->li_opc == LAYOUT_INTENT_PCCRO_CLEAR) { + if (intent->lai_opc == LAYOUT_INTENT_PCCRO_SET || + intent->lai_opc == LAYOUT_INTENT_PCCRO_CLEAR) { if (!S_ISREG(dt->do_lu.lo_header->loh_attr)) RETURN(-EINVAL); diff --git a/lustre/lov/lov_io.c b/lustre/lov/lov_io.c index a4cab2c..bbca162 100644 --- a/lustre/lov/lov_io.c +++ b/lustre/lov/lov_io.c @@ -564,8 +564,8 @@ static int lov_io_slice_init(struct lov_io *lio, } case CIT_LADVISE: { - lio->lis_pos = io->u.ci_ladvise.li_start; - lio->lis_endpos = io->u.ci_ladvise.li_end; + lio->lis_pos = io->u.ci_ladvise.lio_start; + lio->lis_endpos = io->u.ci_ladvise.lio_end; break; } @@ -764,11 +764,11 @@ static void lov_io_sub_inherit(struct lov_io_sub *sub, struct lov_io *lio, break; } case CIT_LADVISE: { - io->u.ci_ladvise.li_start = start; - io->u.ci_ladvise.li_end = end; - io->u.ci_ladvise.li_fid = parent->u.ci_ladvise.li_fid; - io->u.ci_ladvise.li_advice = parent->u.ci_ladvise.li_advice; - io->u.ci_ladvise.li_flags = parent->u.ci_ladvise.li_flags; + io->u.ci_ladvise.lio_start = start; + io->u.ci_ladvise.lio_end = end; + io->u.ci_ladvise.lio_fid = parent->u.ci_ladvise.lio_fid; + io->u.ci_ladvise.lio_advice = parent->u.ci_ladvise.lio_advice; + io->u.ci_ladvise.lio_flags = parent->u.ci_ladvise.lio_flags; break; } case CIT_LSEEK: { diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index 222aa76..9fe0dcd 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -2966,8 +2966,8 @@ mdd_layout_update_rdonly(const struct lu_env *env, struct mdd_object *obj, fl = LU_XATTR_REPLACE; if (mlc->mlc_opc == MD_LAYOUT_WRITE && - mlc->mlc_intent->li_extent.e_end > som->lsa_size) { - som->lsa_size = mlc->mlc_intent->li_extent.e_end + 1; + mlc->mlc_intent->lai_extent.e_end > som->lsa_size) { + som->lsa_size = mlc->mlc_intent->lai_extent.e_end + 1; fl = LU_XATTR_REPLACE; } } @@ -3060,9 +3060,9 @@ mdd_layout_update_write_pending(const struct lu_env *env, if (rc > 0) { lustre_som_swab(som); - if (mlc->mlc_intent->li_extent.e_end > som->lsa_size) { + if (mlc->mlc_intent->lai_extent.e_end > som->lsa_size) { som->lsa_size = - mlc->mlc_intent->li_extent.e_end + 1; + mlc->mlc_intent->lai_extent.e_end + 1; fl = LU_XATTR_REPLACE; } } @@ -3285,8 +3285,8 @@ mdd_layout_change(const struct lu_env *env, struct md_object *o, case MD_LAYOUT_WRITE: { struct layout_intent *intent = mlc->mlc_intent; - if (intent->li_opc == LAYOUT_INTENT_PCCRO_SET || - intent->li_opc == LAYOUT_INTENT_PCCRO_CLEAR) + if (intent->lai_opc == LAYOUT_INTENT_PCCRO_SET || + intent->lai_opc == LAYOUT_INTENT_PCCRO_CLEAR) RETURN(mdd_layout_update_pccro(env, o, mlc)); } case MD_LAYOUT_RESYNC: diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 9008295..03adf09 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -4811,10 +4811,10 @@ static int mdt_intent_layout(enum ldlm_intent_flags it_opc, CDEBUG(D_INFO, DFID "got layout change request from client: " "opc:%u flags:%#x extent "DEXT"\n", - PFID(fid), intent->li_opc, intent->li_flags, - PEXT(&intent->li_extent)); + PFID(fid), intent->lai_opc, intent->lai_flags, + PEXT(&intent->lai_extent)); - switch (intent->li_opc) { + switch (intent->lai_opc) { case LAYOUT_INTENT_TRUNC: case LAYOUT_INTENT_WRITE: case LAYOUT_INTENT_PCCRO_SET: @@ -4829,11 +4829,11 @@ static int mdt_intent_layout(enum ldlm_intent_flags it_opc, case LAYOUT_INTENT_RELEASE: case LAYOUT_INTENT_RESTORE: CERROR("%s: Unsupported layout intent opc %d\n", - mdt_obd_name(info->mti_mdt), intent->li_opc); + mdt_obd_name(info->mti_mdt), intent->lai_opc); RETURN(-ENOTSUPP); default: CERROR("%s: Unknown layout intent opc %d\n", - mdt_obd_name(info->mti_mdt), intent->li_opc); + mdt_obd_name(info->mti_mdt), intent->lai_opc); RETURN(-EINVAL); } diff --git a/lustre/osc/osc_io.c b/lustre/osc/osc_io.c index 23ef563..34f9764 100644 --- a/lustre/osc/osc_io.c +++ b/lustre/osc/osc_io.c @@ -1075,19 +1075,19 @@ static int osc_io_ladvise_start(const struct lu_env *env, memset(ladvise_hdr, 0, buf_size); ladvise_hdr->lah_magic = LADVISE_MAGIC; ladvise_hdr->lah_count = num_advise; - ladvise_hdr->lah_flags = lio->li_flags; + ladvise_hdr->lah_flags = lio->lio_flags; memset(oa, 0, sizeof(*oa)); oa->o_oi = loi->loi_oi; oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP; - obdo_set_parent_fid(oa, lio->li_fid); + obdo_set_parent_fid(oa, lio->lio_fid); ladvise = ladvise_hdr->lah_advise; - ladvise->lla_start = lio->li_start; - ladvise->lla_end = lio->li_end; - ladvise->lla_advice = lio->li_advice; + ladvise->lla_start = lio->lio_start; + ladvise->lla_end = lio->lio_end; + ladvise->lla_advice = lio->lio_advice; - if (lio->li_flags & LF_ASYNC) { + if (lio->lio_flags & LF_ASYNC) { result = osc_ladvise_base(osc_export(cl2osc(obj)), oa, ladvise_hdr, NULL, NULL, NULL); } else { @@ -1109,7 +1109,7 @@ static void osc_io_ladvise_end(const struct lu_env *env, int result = 0; struct cl_ladvise_io *lio = &io->u.ci_ladvise; - if ((!(lio->li_flags & LF_ASYNC)) && cbargs->opc_rpc_sent) { + if ((!(lio->lio_flags & LF_ASYNC)) && cbargs->opc_rpc_sent) { wait_for_completion(&cbargs->opc_sync); result = cbargs->opc_rc; } diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index 6a18c5e..cab83de 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -2995,9 +2995,9 @@ static void lustre_swab_lu_extent(struct lu_extent *le) void lustre_swab_layout_intent(struct layout_intent *li) { - __swab32s(&li->li_opc); - __swab32s(&li->li_flags); - lustre_swab_lu_extent(&li->li_extent); + __swab32s(&li->lai_opc); + __swab32s(&li->lai_flags); + lustre_swab_lu_extent(&li->lai_extent); } void lustre_swab_hsm_progress_kernel(struct hsm_progress_kernel *hpk) diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index cf2d72d..8549a3b 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -5015,18 +5015,18 @@ void lustre_assert_wire_constants(void) /* Checks for struct layout_intent */ LASSERTF((int)sizeof(struct layout_intent) == 24, "found %lld\n", (long long)(int)sizeof(struct layout_intent)); - LASSERTF((int)offsetof(struct layout_intent, li_opc) == 0, "found %lld\n", - (long long)(int)offsetof(struct layout_intent, li_opc)); - LASSERTF((int)sizeof(((struct layout_intent *)0)->li_opc) == 4, "found %lld\n", - (long long)(int)sizeof(((struct layout_intent *)0)->li_opc)); - LASSERTF((int)offsetof(struct layout_intent, li_flags) == 4, "found %lld\n", - (long long)(int)offsetof(struct layout_intent, li_flags)); - LASSERTF((int)sizeof(((struct layout_intent *)0)->li_flags) == 4, "found %lld\n", - (long long)(int)sizeof(((struct layout_intent *)0)->li_flags)); - LASSERTF((int)offsetof(struct layout_intent, li_extent) == 8, "found %lld\n", - (long long)(int)offsetof(struct layout_intent, li_extent)); - LASSERTF((int)sizeof(((struct layout_intent *)0)->li_extent) == 16, "found %lld\n", - (long long)(int)sizeof(((struct layout_intent *)0)->li_extent)); + LASSERTF((int)offsetof(struct layout_intent, lai_opc) == 0, "found %lld\n", + (long long)(int)offsetof(struct layout_intent, lai_opc)); + LASSERTF((int)sizeof(((struct layout_intent *)0)->lai_opc) == 4, "found %lld\n", + (long long)(int)sizeof(((struct layout_intent *)0)->lai_opc)); + LASSERTF((int)offsetof(struct layout_intent, lai_flags) == 4, "found %lld\n", + (long long)(int)offsetof(struct layout_intent, lai_flags)); + LASSERTF((int)sizeof(((struct layout_intent *)0)->lai_flags) == 4, "found %lld\n", + (long long)(int)sizeof(((struct layout_intent *)0)->lai_flags)); + LASSERTF((int)offsetof(struct layout_intent, lai_extent) == 8, "found %lld\n", + (long long)(int)offsetof(struct layout_intent, lai_extent)); + LASSERTF((int)sizeof(((struct layout_intent *)0)->lai_extent) == 16, "found %lld\n", + (long long)(int)sizeof(((struct layout_intent *)0)->lai_extent)); LASSERTF(LAYOUT_INTENT_ACCESS == 0, "found %lld\n", (long long)LAYOUT_INTENT_ACCESS); LASSERTF(LAYOUT_INTENT_READ == 1, "found %lld\n", diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index 10cb139..4668a0d 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -2507,9 +2507,9 @@ static void check_layout_intent(void) { BLANK_LINE(); CHECK_STRUCT(layout_intent); - CHECK_MEMBER(layout_intent, li_opc); - CHECK_MEMBER(layout_intent, li_flags); - CHECK_MEMBER(layout_intent, li_extent); + CHECK_MEMBER(layout_intent, lai_opc); + CHECK_MEMBER(layout_intent, lai_flags); + CHECK_MEMBER(layout_intent, lai_extent); CHECK_VALUE(LAYOUT_INTENT_ACCESS); CHECK_VALUE(LAYOUT_INTENT_READ); diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 2fe67a4..fa20d85 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -5076,18 +5076,18 @@ void lustre_assert_wire_constants(void) /* Checks for struct layout_intent */ LASSERTF((int)sizeof(struct layout_intent) == 24, "found %lld\n", (long long)(int)sizeof(struct layout_intent)); - LASSERTF((int)offsetof(struct layout_intent, li_opc) == 0, "found %lld\n", - (long long)(int)offsetof(struct layout_intent, li_opc)); - LASSERTF((int)sizeof(((struct layout_intent *)0)->li_opc) == 4, "found %lld\n", - (long long)(int)sizeof(((struct layout_intent *)0)->li_opc)); - LASSERTF((int)offsetof(struct layout_intent, li_flags) == 4, "found %lld\n", - (long long)(int)offsetof(struct layout_intent, li_flags)); - LASSERTF((int)sizeof(((struct layout_intent *)0)->li_flags) == 4, "found %lld\n", - (long long)(int)sizeof(((struct layout_intent *)0)->li_flags)); - LASSERTF((int)offsetof(struct layout_intent, li_extent) == 8, "found %lld\n", - (long long)(int)offsetof(struct layout_intent, li_extent)); - LASSERTF((int)sizeof(((struct layout_intent *)0)->li_extent) == 16, "found %lld\n", - (long long)(int)sizeof(((struct layout_intent *)0)->li_extent)); + LASSERTF((int)offsetof(struct layout_intent, lai_opc) == 0, "found %lld\n", + (long long)(int)offsetof(struct layout_intent, lai_opc)); + LASSERTF((int)sizeof(((struct layout_intent *)0)->lai_opc) == 4, "found %lld\n", + (long long)(int)sizeof(((struct layout_intent *)0)->lai_opc)); + LASSERTF((int)offsetof(struct layout_intent, lai_flags) == 4, "found %lld\n", + (long long)(int)offsetof(struct layout_intent, lai_flags)); + LASSERTF((int)sizeof(((struct layout_intent *)0)->lai_flags) == 4, "found %lld\n", + (long long)(int)sizeof(((struct layout_intent *)0)->lai_flags)); + LASSERTF((int)offsetof(struct layout_intent, lai_extent) == 8, "found %lld\n", + (long long)(int)offsetof(struct layout_intent, lai_extent)); + LASSERTF((int)sizeof(((struct layout_intent *)0)->lai_extent) == 16, "found %lld\n", + (long long)(int)sizeof(((struct layout_intent *)0)->lai_extent)); LASSERTF(LAYOUT_INTENT_ACCESS == 0, "found %lld\n", (long long)LAYOUT_INTENT_ACCESS); LASSERTF(LAYOUT_INTENT_READ == 1, "found %lld\n", -- 1.8.3.1