From: John L. Hammond Date: Fri, 16 Jan 2015 19:38:23 +0000 (-0600) Subject: LU-6047 lustre: remove Size on MDS support X-Git-Tag: 2.7.53~21 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b0638b322b8c8adb2cf5f6189efd17ad70f3af2c LU-6047 lustre: remove Size on MDS support Remove unused definitions related to Size on MDS support from lustre/include/lustre/lustre_idl.h. Remove unused code from several places in lustre/. Signed-off-by: John L. Hammond Change-Id: I1673cd918539c264ea65e2384d72b32e34e8063b Reviewed-on: http://review.whamcloud.com/13443 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin --- diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index 7b7555f..6a7b8a5 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -303,7 +303,7 @@ static inline int range_compare_loc(const struct lu_seq_range *r1, */ enum lma_compat { LMAC_HSM = 0x00000001, - LMAC_SOM = 0x00000002, +/* LMAC_SOM = 0x00000002, obsolete since 2.8.0 */ LMAC_NOT_IN_OI = 0x00000004, /* the object does NOT need OI mapping */ LMAC_FID_ON_OST = 0x00000008, /* For OST-object, its OI mapping is * under /O//d. */ @@ -327,29 +327,6 @@ extern void lustre_lma_swab(struct lustre_mdt_attrs *lma); extern void lustre_lma_init(struct lustre_mdt_attrs *lma, const struct lu_fid *fid, __u32 compat, __u32 incompat); -/** - * SOM on-disk attributes stored in a separate xattr. - */ -struct som_attrs { - /** Bitfield for supported data in this structure. For future use. */ - __u32 som_compat; - - /** Incompat feature list. The supported feature mask is availabe in - * SOM_INCOMPAT_SUPP */ - __u32 som_incompat; - - /** IO Epoch SOM attributes belongs to */ - __u64 som_ioepoch; - /** total file size in objects */ - __u64 som_size; - /** total fs blocks in objects */ - __u64 som_blocks; - /** mds mount id the size is valid for */ - __u64 som_mountid; -}; -extern void lustre_som_swab(struct som_attrs *attrs); - -#define SOM_INCOMPAT_SUPP 0x0 /* copytool uses a 32b bitmask field to encode archive-Ids during register * with MDT thru kuc. @@ -1381,7 +1358,7 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb); OBD_CONNECT_OSS_CAPA | OBD_CONNECT_MDS_MDS | \ OBD_CONNECT_FID | LRU_RESIZE_CONNECT_FLAG | \ OBD_CONNECT_VBR | OBD_CONNECT_LOV_V3 | \ - OBD_CONNECT_SOM | OBD_CONNECT_FULL20 | \ + OBD_CONNECT_FULL20 | \ OBD_CONNECT_64BITHASH | OBD_CONNECT_JOBSTATS | \ OBD_CONNECT_EINPROGRESS | \ OBD_CONNECT_LIGHTWEIGHT | OBD_CONNECT_UMASK | \ @@ -2123,7 +2100,7 @@ typedef enum { MDS_PIN = 42, /* obsolete, never used in a release */ MDS_UNPIN = 43, /* obsolete, never used in a release */ MDS_SYNC = 44, - MDS_DONE_WRITING = 45, + MDS_DONE_WRITING = 45, /* obsolete since 2.8.0 */ MDS_SET_INFO = 46, MDS_QUOTACHECK = 47, MDS_QUOTACTL = 48, @@ -2229,24 +2206,6 @@ enum { #define MDS_STATUS_CONN 1 #define MDS_STATUS_LOV 2 -/* mdt_thread_info.mti_flags. */ -enum md_op_flags { - /* The flag indicates Size-on-MDS attributes are changed. */ - MF_SOM_CHANGE = (1 << 0), - /* Flags indicates an epoch opens or closes. */ - MF_EPOCH_OPEN = (1 << 1), - MF_EPOCH_CLOSE = (1 << 2), - MF_MDC_CANCEL_FID1 = (1 << 3), - MF_MDC_CANCEL_FID2 = (1 << 4), - MF_MDC_CANCEL_FID3 = (1 << 5), - MF_MDC_CANCEL_FID4 = (1 << 6), - /* There is a pending attribute update. */ - MF_SOM_AU = (1 << 7), - /* Cancel OST locks while getattr OST attributes. */ - MF_GETATTR_LOCK = (1 << 8), - MF_GET_MDT_IDX = (1 << 9), -}; - #define LUSTRE_BFLAG_UNCOMMITTED_WRITES 0x1 /* these should be identical to their EXT4_*_FL counterparts, they are @@ -2334,10 +2293,10 @@ struct mdt_body { extern void lustre_swab_mdt_body (struct mdt_body *b); struct mdt_ioepoch { - struct lustre_handle handle; - __u64 ioepoch; - __u32 flags; - __u32 padding; + struct lustre_handle mio_handle; + __u64 mio_unused1; /* was ioepoch */ + __u32 mio_unused2; /* was flags */ + __u32 mio_padding; }; extern void lustre_swab_mdt_ioepoch (struct mdt_ioepoch *b); @@ -2426,12 +2385,9 @@ extern void lustre_swab_mdt_rec_setattr (struct mdt_rec_setattr *sa); #define MDS_FMODE_CLOSED 00000000 #define MDS_FMODE_EXEC 00000004 -/* IO Epoch is opened on a closed file. */ -#define MDS_FMODE_EPOCH 01000000 -/* IO Epoch is opened on a file truncate. */ -#define MDS_FMODE_TRUNC 02000000 -/* Size-on-MDS Attribute Update is pending. */ -#define MDS_FMODE_SOM 04000000 +/* MDS_FMODE_EPOCH 01000000 obsolete since 2.8.0 */ +/* MDS_FMODE_TRUNC 02000000 obsolete since 2.8.0 */ +/* MDS_FMODE_SOM 04000000 obsolete since 2.8.0 */ #define MDS_OPEN_CREATED 00000010 #define MDS_OPEN_CROSS 00000020 @@ -2494,7 +2450,7 @@ enum mds_op_bias { MDS_CROSS_REF = 1 << 1, MDS_VTX_BYPASS = 1 << 2, MDS_PERM_BYPASS = 1 << 3, - MDS_SOM = 1 << 4, +/* MDS_SOM = 1 << 4, obsolete since 2.8.0 */ MDS_QUOTA_IGNORE = 1 << 5, /* Was MDS_CLOSE_CLEANUP (1 << 6), No more used */ MDS_KEEP_ORPHAN = 1 << 7, diff --git a/lustre/include/lustre_export.h b/lustre/include/lustre_export.h index 022b4b6..851edca 100644 --- a/lustre/include/lustre_export.h +++ b/lustre/include/lustre_export.h @@ -340,12 +340,6 @@ static inline int exp_connect_vbr(struct obd_export *exp) return !!(exp_connect_flags(exp) & OBD_CONNECT_VBR); } -static inline int exp_connect_som(struct obd_export *exp) -{ - LASSERT(exp != NULL); - return !!(exp_connect_flags(exp) & OBD_CONNECT_SOM); -} - static inline int exp_connect_umask(struct obd_export *exp) { return !!(exp_connect_flags(exp) & OBD_CONNECT_UMASK); diff --git a/lustre/include/lustre_req_layout.h b/lustre/include/lustre_req_layout.h index bb22a35..8ad58d9 100644 --- a/lustre/include/lustre_req_layout.h +++ b/lustre/include/lustre_req_layout.h @@ -171,7 +171,6 @@ extern struct req_format RQF_MDS_CONNECT; extern struct req_format RQF_MDS_DISCONNECT; extern struct req_format RQF_MDS_GET_INFO; extern struct req_format RQF_MDS_READPAGE; -extern struct req_format RQF_MDS_DONE_WRITING; extern struct req_format RQF_MDS_REINT; extern struct req_format RQF_MDS_REINT_CREATE; extern struct req_format RQF_MDS_REINT_CREATE_RMT_ACL; diff --git a/lustre/include/md_object.h b/lustre/include/md_object.h index afbf660..ebc48e2 100644 --- a/lustre/include/md_object.h +++ b/lustre/include/md_object.h @@ -77,9 +77,8 @@ enum ma_valid { MA_ACL_DEF = (1 << 5), MA_LOV_DEF = (1 << 6), MA_HSM = (1 << 7), - MA_SOM = (1 << 8), - MA_PFID = (1 << 9), - MA_LMV_DEF = (1 << 10) + MA_PFID = (1 << 8), + MA_LMV_DEF = (1 << 9), }; typedef enum { @@ -111,21 +110,6 @@ struct md_hsm { __u64 mh_arch_ver; }; -#define IOEPOCH_INVAL 0 - -/* memory structure for som attributes - * for fields description see the on disk structure som_attrs - * which is defined in lustre_idl.h - */ -struct md_som_data { - __u32 msd_compat; - __u32 msd_incompat; - __u64 msd_ioepoch; - __u64 msd_size; - __u64 msd_blocks; - __u64 msd_mountid; -}; - struct md_attr { __u64 ma_valid; __u64 ma_need; @@ -136,7 +120,6 @@ struct md_attr { struct lov_mds_md *ma_lmm; union lmv_mds_md *ma_lmv; void *ma_acl; - struct md_som_data *ma_som; int ma_lmm_size; int ma_lmv_size; int ma_acl_size; @@ -593,7 +576,6 @@ enum mdd_object_role { struct dt_device; -int lustre_buf2som(void *buf, int rc, struct md_som_data *msd); int lustre_buf2hsm(void *buf, int rc, struct md_hsm *mh); void lustre_hsm2buf(void *buf, const struct md_hsm *mh); diff --git a/lustre/include/obd.h b/lustre/include/obd.h index 1435b13..e485c6e 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -815,6 +815,14 @@ static inline int it_to_lock_mode(struct lookup_intent *it) return -EINVAL; } +enum md_op_flags { + MF_MDC_CANCEL_FID1 = 1 << 0, + MF_MDC_CANCEL_FID2 = 1 << 1, + MF_MDC_CANCEL_FID3 = 1 << 2, + MF_MDC_CANCEL_FID4 = 1 << 3, + MF_GET_MDT_IDX = 1 << 4, +}; + enum md_cli_flags { CLI_SET_MEA = 1 << 0, CLI_RM_ENTRY = 1 << 1, diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h index 13beaa4..dec4ada 100644 --- a/lustre/include/obd_support.h +++ b/lustre/include/obd_support.h @@ -197,8 +197,8 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type, #define OBD_FAIL_MDS_ALL_REQUEST_NET 0x123 #define OBD_FAIL_MDS_SYNC_NET 0x124 #define OBD_FAIL_MDS_SYNC_PACK 0x125 -#define OBD_FAIL_MDS_DONE_WRITING_NET 0x126 -#define OBD_FAIL_MDS_DONE_WRITING_PACK 0x127 +/* OBD_FAIL_MDS_DONE_WRITING_NET 0x126 obsolete since 2.8.0 */ +/* OBD_FAIL_MDS_DONE_WRITING_PACK 0x127 obsolete since 2.8.0 */ #define OBD_FAIL_MDS_ALLOC_OBDO 0x128 #define OBD_FAIL_MDS_PAUSE_OPEN 0x129 #define OBD_FAIL_MDS_STATFS_LCW_SLEEP 0x12a diff --git a/lustre/mdc/mdc_lib.c b/lustre/mdc/mdc_lib.c index 1d146fd..c52b6a2 100644 --- a/lustre/mdc/mdc_lib.c +++ b/lustre/mdc/mdc_lib.c @@ -349,11 +349,12 @@ static void mdc_setattr_pack_rec(struct mdt_rec_setattr *rec, } static void mdc_ioepoch_pack(struct mdt_ioepoch *epoch, - struct md_op_data *op_data) + struct md_op_data *op_data) { - memcpy(&epoch->handle, &op_data->op_handle, sizeof(epoch->handle)); - epoch->ioepoch = 0; - epoch->flags = 0; + epoch->mio_handle = op_data->op_handle; + epoch->mio_unused1 = 0; + epoch->mio_unused2 = 0; + epoch->mio_padding = 0; } void mdc_setattr_pack(struct ptlrpc_request *req, struct md_op_data *op_data, diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index b75b550..3946940 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -677,16 +677,17 @@ void mdc_replay_open(struct ptlrpc_request *req) struct mdt_ioepoch *epoch; LASSERT(opc == MDS_CLOSE); - epoch = req_capsule_client_get(&close_req->rq_pill, - &RMF_MDT_EPOCH); - LASSERT(epoch); - - if (och != NULL) - LASSERT(!memcmp(&old, &epoch->handle, sizeof(old))); - DEBUG_REQ(D_HA, close_req, "updating close body with new fh"); - epoch->handle = body->mbo_handle; - } - EXIT; + epoch = req_capsule_client_get(&close_req->rq_pill, + &RMF_MDT_EPOCH); + LASSERT(epoch); + + if (och != NULL) + LASSERT(!memcmp(&old, &epoch->mio_handle, sizeof(old))); + + DEBUG_REQ(D_HA, close_req, "updating close body with new fh"); + epoch->mio_handle = body->mbo_handle; + } + EXIT; } void mdc_commit_open(struct ptlrpc_request *req) diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index 0bfd37d..35d9fdd 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -437,8 +437,6 @@ static int mdd_fix_attr(const struct lu_env *env, struct mdd_object *obj, LASSERT(oattr != NULL); - /* export destroy does not have ->le_ses, but we may want - * to drop LUSTRE_SOM_FL. */ uc = lu_ucred_check(env); if (uc == NULL) RETURN(0); @@ -594,44 +592,24 @@ static int mdd_fix_attr(const struct lu_env *env, struct mdd_object *obj, } } - /* For both Size-on-MDS case and truncate case, - * "la->la_valid & (LA_SIZE | LA_BLOCKS)" are ture. - * We distinguish them by "flags & MDS_SOM". - * For SOM case, it is true, the MAY_WRITE perm has been checked - * when open, no need check again. For truncate case, it is false, - * the MAY_WRITE perm should be checked here. */ - if (flags & MDS_SOM) { - /* For the "Size-on-MDS" setattr update, merge coming - * attributes with the set in the inode. BUG 10641 */ - if ((la->la_valid & LA_ATIME) && - (la->la_atime <= oattr->la_atime)) - la->la_valid &= ~LA_ATIME; - - /* OST attributes do not have a priority over MDS attributes, - * so drop times if ctime is equal. */ - if ((la->la_valid & LA_CTIME) && - (la->la_ctime <= oattr->la_ctime)) - la->la_valid &= ~(LA_MTIME | LA_CTIME); - } else { - if (la->la_valid & (LA_SIZE | LA_BLOCKS)) { - if (!((flags & MDS_OWNEROVERRIDE) && - (uc->uc_fsuid == oattr->la_uid)) && - !(flags & MDS_PERM_BYPASS)) { - rc = mdd_permission_internal(env, obj, - oattr, MAY_WRITE); - if (rc != 0) - RETURN(rc); - } - } - if (la->la_valid & LA_CTIME) { - /* The pure setattr, it has the priority over what is - * already set, do not drop it if ctime is equal. */ - if (la->la_ctime < oattr->la_ctime) - la->la_valid &= ~(LA_ATIME | LA_MTIME | - LA_CTIME); + if (la->la_valid & (LA_SIZE | LA_BLOCKS)) { + if (!((flags & MDS_OWNEROVERRIDE) && + (uc->uc_fsuid == oattr->la_uid)) && + !(flags & MDS_PERM_BYPASS)) { + rc = mdd_permission_internal(env, obj, oattr, + MAY_WRITE); + if (rc != 0) + RETURN(rc); } } + if (la->la_valid & LA_CTIME) { + /* The pure setattr, it has the priority over what is + * already set, do not drop it if ctime is equal. */ + if (la->la_ctime < oattr->la_ctime) + la->la_valid &= ~(LA_ATIME | LA_MTIME | LA_CTIME); + } + RETURN(0); } @@ -844,10 +822,9 @@ int mdd_attr_set(const struct lu_env *env, struct md_object *obj, int rc; ENTRY; - /* we do not use ->attr_set() for LOV/SOM/HSM EA any more */ + /* we do not use ->attr_set() for LOV/HSM EA any more */ LASSERT((ma->ma_valid & MA_LOV) == 0); LASSERT((ma->ma_valid & MA_HSM) == 0); - LASSERT((ma->ma_valid & MA_SOM) == 0); rc = mdd_la_get(env, mdd_obj, attr); if (rc) diff --git a/lustre/mdt/mdt_lib.c b/lustre/mdt/mdt_lib.c index d212c56..c697680 100644 --- a/lustre/mdt/mdt_lib.c +++ b/lustre/mdt/mdt_lib.c @@ -963,7 +963,7 @@ static int mdt_close_handle_unpack(struct mdt_thread_info *info) if (ioepoch == NULL) RETURN(-EPROTO); - info->mti_close_handle = ioepoch->handle; + info->mti_close_handle = ioepoch->mio_handle; RETURN(0); } diff --git a/lustre/obdclass/md_attrs.c b/lustre/obdclass/md_attrs.c index c82e7f9..e06eb50 100644 --- a/lustre/obdclass/md_attrs.c +++ b/lustre/obdclass/md_attrs.c @@ -70,65 +70,6 @@ void lustre_lma_swab(struct lustre_mdt_attrs *lma) EXPORT_SYMBOL(lustre_lma_swab); /** - * Swab, if needed, SOM structure which is stored on-disk in little-endian - * order. - * - * \param attrs - is a pointer to the SOM structure to be swabbed. - */ -void lustre_som_swab(struct som_attrs *attrs) -{ - /* Use LUSTRE_MSG_MAGIC to detect local endianess. */ - if (LUSTRE_MSG_MAGIC != cpu_to_le32(LUSTRE_MSG_MAGIC)) { - __swab32s(&attrs->som_compat); - __swab32s(&attrs->som_incompat); - __swab64s(&attrs->som_ioepoch); - __swab64s(&attrs->som_size); - __swab64s(&attrs->som_blocks); - __swab64s(&attrs->som_mountid); - } -}; -EXPORT_SYMBOL(lustre_som_swab); - -/* - * Swab and extract SOM attributes from on-disk xattr. - * - * \param buf - is a buffer containing the on-disk SOM extended attribute. - * \param rc - is the SOM xattr stored in \a buf - * \param msd - is the md_som_data structure where to extract SOM attributes. - */ -int lustre_buf2som(void *buf, int rc, struct md_som_data *msd) -{ - struct som_attrs *attrs = (struct som_attrs *)buf; - ENTRY; - - if (rc == 0 || rc == -ENODATA) - /* no SOM attributes */ - RETURN(-ENODATA); - - if (rc < 0) - /* error hit while fetching xattr */ - RETURN(rc); - - /* check SOM compatibility */ - if (attrs->som_incompat & ~cpu_to_le32(SOM_INCOMPAT_SUPP)) - RETURN(-ENODATA); - - /* unpack SOM attributes */ - lustre_som_swab(attrs); - - /* fill in-memory msd structure */ - msd->msd_compat = attrs->som_compat; - msd->msd_incompat = attrs->som_incompat; - msd->msd_ioepoch = attrs->som_ioepoch; - msd->msd_size = attrs->som_size; - msd->msd_blocks = attrs->som_blocks; - msd->msd_mountid = attrs->som_mountid; - - RETURN(0); -} -EXPORT_SYMBOL(lustre_buf2som); - -/** * Swab, if needed, HSM structure which is stored on-disk in little-endian * order. * diff --git a/lustre/ptlrpc/layout.c b/lustre/ptlrpc/layout.c index 877235e..0f0946a 100644 --- a/lustre/ptlrpc/layout.c +++ b/lustre/ptlrpc/layout.c @@ -721,7 +721,6 @@ static struct req_format *req_formats[] = { &RQF_MDS_CLOSE, &RQF_MDS_RELEASE_CLOSE, &RQF_MDS_READPAGE, - &RQF_MDS_DONE_WRITING, &RQF_MDS_REINT, &RQF_MDS_REINT_CREATE, &RQF_MDS_REINT_CREATE_RMT_ACL, @@ -1493,11 +1492,6 @@ struct req_format RQF_MDS_RELEASE_CLOSE = mdt_release_close_client, mds_last_unlink_server); EXPORT_SYMBOL(RQF_MDS_RELEASE_CLOSE); -struct req_format RQF_MDS_DONE_WRITING = - DEFINE_REQ_FMT0("MDS_DONE_WRITING", - mdt_close_client, mdt_body_only); -EXPORT_SYMBOL(RQF_MDS_DONE_WRITING); - struct req_format RQF_MDS_READPAGE = DEFINE_REQ_FMT0("MDS_READPAGE", mdt_body_capa, mdt_body_only); diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index 3f453ad..dcacf85 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -1841,12 +1841,12 @@ void lustre_swab_mdt_body (struct mdt_body *b) CLASSERT(offsetof(typeof(*b), mbo_padding_5) != 0); } -void lustre_swab_mdt_ioepoch (struct mdt_ioepoch *b) +void lustre_swab_mdt_ioepoch(struct mdt_ioepoch *b) { - /* handle is opaque */ - __swab64s (&b->ioepoch); - __swab32s (&b->flags); - CLASSERT(offsetof(typeof(*b), padding) != 0); + /* mio_handle is opaque */ + CLASSERT(offsetof(typeof(*b), mio_unused1) != 0); + CLASSERT(offsetof(typeof(*b), mio_unused2) != 0); + CLASSERT(offsetof(typeof(*b), mio_padding) != 0); } void lustre_swab_mgs_target_info(struct mgs_target_info *mti) diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 54b866f..c96bc9d 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -227,24 +227,6 @@ void lustre_assert_wire_constants(void) (long long)MDS_STATUS_LOV); LASSERTF(LUSTRE_BFLAG_UNCOMMITTED_WRITES == 1, "found %lld\n", (long long)LUSTRE_BFLAG_UNCOMMITTED_WRITES); - LASSERTF(MF_SOM_CHANGE == 0x00000001UL, "found 0x%.8xUL\n", - (unsigned)MF_SOM_CHANGE); - LASSERTF(MF_EPOCH_OPEN == 0x00000002UL, "found 0x%.8xUL\n", - (unsigned)MF_EPOCH_OPEN); - LASSERTF(MF_EPOCH_CLOSE == 0x00000004UL, "found 0x%.8xUL\n", - (unsigned)MF_EPOCH_CLOSE); - LASSERTF(MF_MDC_CANCEL_FID1 == 0x00000008UL, "found 0x%.8xUL\n", - (unsigned)MF_MDC_CANCEL_FID1); - LASSERTF(MF_MDC_CANCEL_FID2 == 0x00000010UL, "found 0x%.8xUL\n", - (unsigned)MF_MDC_CANCEL_FID2); - LASSERTF(MF_MDC_CANCEL_FID3 == 0x00000020UL, "found 0x%.8xUL\n", - (unsigned)MF_MDC_CANCEL_FID3); - LASSERTF(MF_MDC_CANCEL_FID4 == 0x00000040UL, "found 0x%.8xUL\n", - (unsigned)MF_MDC_CANCEL_FID4); - LASSERTF(MF_SOM_AU == 0x00000080UL, "found 0x%.8xUL\n", - (unsigned)MF_SOM_AU); - LASSERTF(MF_GETATTR_LOCK == 0x00000100UL, "found 0x%.8xUL\n", - (unsigned)MF_GETATTR_LOCK); LASSERTF(MDS_ATTR_MODE == 0x0000000000000001ULL, "found 0x%.16llxULL\n", (long long)MDS_ATTR_MODE); LASSERTF(MDS_ATTR_UID == 0x0000000000000002ULL, "found 0x%.16llxULL\n", @@ -446,8 +428,6 @@ void lustre_assert_wire_constants(void) (unsigned)LMAI_RELEASED); LASSERTF(LMAC_HSM == 0x00000001UL, "found 0x%.8xUL\n", (unsigned)LMAC_HSM); - LASSERTF(LMAC_SOM == 0x00000002UL, "found 0x%.8xUL\n", - (unsigned)LMAC_SOM); LASSERTF(LMAC_NOT_IN_OI == 0x00000004UL, "found 0x%.8xUL\n", (unsigned)LMAC_NOT_IN_OI); LASSERTF(LMAC_FID_ON_OST == 0x00000008UL, "found 0x%.8xUL\n", @@ -477,34 +457,6 @@ void lustre_assert_wire_constants(void) LASSERTF(OUT_INDEX_DELETE == 11, "found %lld\n", (long long)OUT_INDEX_DELETE); - /* Checks for struct som_attrs */ - LASSERTF((int)sizeof(struct som_attrs) == 40, "found %lld\n", - (long long)(int)sizeof(struct som_attrs)); - LASSERTF((int)offsetof(struct som_attrs, som_compat) == 0, "found %lld\n", - (long long)(int)offsetof(struct som_attrs, som_compat)); - LASSERTF((int)sizeof(((struct som_attrs *)0)->som_compat) == 4, "found %lld\n", - (long long)(int)sizeof(((struct som_attrs *)0)->som_compat)); - LASSERTF((int)offsetof(struct som_attrs, som_incompat) == 4, "found %lld\n", - (long long)(int)offsetof(struct som_attrs, som_incompat)); - LASSERTF((int)sizeof(((struct som_attrs *)0)->som_incompat) == 4, "found %lld\n", - (long long)(int)sizeof(((struct som_attrs *)0)->som_incompat)); - LASSERTF((int)offsetof(struct som_attrs, som_ioepoch) == 8, "found %lld\n", - (long long)(int)offsetof(struct som_attrs, som_ioepoch)); - LASSERTF((int)sizeof(((struct som_attrs *)0)->som_ioepoch) == 8, "found %lld\n", - (long long)(int)sizeof(((struct som_attrs *)0)->som_ioepoch)); - LASSERTF((int)offsetof(struct som_attrs, som_size) == 16, "found %lld\n", - (long long)(int)offsetof(struct som_attrs, som_size)); - LASSERTF((int)sizeof(((struct som_attrs *)0)->som_size) == 8, "found %lld\n", - (long long)(int)sizeof(((struct som_attrs *)0)->som_size)); - LASSERTF((int)offsetof(struct som_attrs, som_blocks) == 24, "found %lld\n", - (long long)(int)offsetof(struct som_attrs, som_blocks)); - LASSERTF((int)sizeof(((struct som_attrs *)0)->som_blocks) == 8, "found %lld\n", - (long long)(int)sizeof(((struct som_attrs *)0)->som_blocks)); - LASSERTF((int)offsetof(struct som_attrs, som_mountid) == 32, "found %lld\n", - (long long)(int)offsetof(struct som_attrs, som_mountid)); - LASSERTF((int)sizeof(((struct som_attrs *)0)->som_mountid) == 8, "found %lld\n", - (long long)(int)sizeof(((struct som_attrs *)0)->som_mountid)); - /* Checks for struct hsm_attrs */ LASSERTF((int)sizeof(struct hsm_attrs) == 24, "found %lld\n", (long long)(int)sizeof(struct hsm_attrs)); @@ -2131,12 +2083,6 @@ void lustre_assert_wire_constants(void) MDS_FMODE_CLOSED); LASSERTF(MDS_FMODE_EXEC == 000000000004UL, "found 0%.11oUL\n", MDS_FMODE_EXEC); - LASSERTF(MDS_FMODE_EPOCH == 000001000000UL, "found 0%.11oUL\n", - MDS_FMODE_EPOCH); - LASSERTF(MDS_FMODE_TRUNC == 000002000000UL, "found 0%.11oUL\n", - MDS_FMODE_TRUNC); - LASSERTF(MDS_FMODE_SOM == 000004000000UL, "found 0%.11oUL\n", - MDS_FMODE_SOM); LASSERTF(MDS_OPEN_CREATED == 000000000010UL, "found 0%.11oUL\n", MDS_OPEN_CREATED); LASSERTF(MDS_OPEN_CROSS == 000000000020UL, "found 0%.11oUL\n", @@ -2195,22 +2141,22 @@ void lustre_assert_wire_constants(void) /* Checks for struct mdt_ioepoch */ LASSERTF((int)sizeof(struct mdt_ioepoch) == 24, "found %lld\n", (long long)(int)sizeof(struct mdt_ioepoch)); - LASSERTF((int)offsetof(struct mdt_ioepoch, handle) == 0, "found %lld\n", - (long long)(int)offsetof(struct mdt_ioepoch, handle)); - LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->handle) == 8, "found %lld\n", - (long long)(int)sizeof(((struct mdt_ioepoch *)0)->handle)); - LASSERTF((int)offsetof(struct mdt_ioepoch, ioepoch) == 8, "found %lld\n", - (long long)(int)offsetof(struct mdt_ioepoch, ioepoch)); - LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->ioepoch) == 8, "found %lld\n", - (long long)(int)sizeof(((struct mdt_ioepoch *)0)->ioepoch)); - LASSERTF((int)offsetof(struct mdt_ioepoch, flags) == 16, "found %lld\n", - (long long)(int)offsetof(struct mdt_ioepoch, flags)); - LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->flags) == 4, "found %lld\n", - (long long)(int)sizeof(((struct mdt_ioepoch *)0)->flags)); - LASSERTF((int)offsetof(struct mdt_ioepoch, padding) == 20, "found %lld\n", - (long long)(int)offsetof(struct mdt_ioepoch, padding)); - LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->padding) == 4, "found %lld\n", - (long long)(int)sizeof(((struct mdt_ioepoch *)0)->padding)); + LASSERTF((int)offsetof(struct mdt_ioepoch, mio_handle) == 0, "found %lld\n", + (long long)(int)offsetof(struct mdt_ioepoch, mio_handle)); + LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_handle) == 8, "found %lld\n", + (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_handle)); + LASSERTF((int)offsetof(struct mdt_ioepoch, mio_unused1) == 8, "found %lld\n", + (long long)(int)offsetof(struct mdt_ioepoch, mio_unused1)); + LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_unused1) == 8, "found %lld\n", + (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_unused1)); + LASSERTF((int)offsetof(struct mdt_ioepoch, mio_unused2) == 16, "found %lld\n", + (long long)(int)offsetof(struct mdt_ioepoch, mio_unused2)); + LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_unused2) == 4, "found %lld\n", + (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_unused2)); + LASSERTF((int)offsetof(struct mdt_ioepoch, mio_padding) == 20, "found %lld\n", + (long long)(int)offsetof(struct mdt_ioepoch, mio_padding)); + LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_padding) == 4, "found %lld\n", + (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_padding)); /* Checks for struct mdt_remote_perm */ LASSERTF((int)sizeof(struct mdt_remote_perm) == 32, "found %lld\n", diff --git a/lustre/target/tgt_handler.c b/lustre/target/tgt_handler.c index 2bf4c74..93ff6cb 100644 --- a/lustre/target/tgt_handler.c +++ b/lustre/target/tgt_handler.c @@ -458,7 +458,6 @@ static int tgt_filter_recovery_request(struct ptlrpc_request *req, *process = 1; RETURN(0); case MDS_CLOSE: - case MDS_DONE_WRITING: case MDS_SYNC: /* used in unmounting */ case OBD_PING: case MDS_REINT: diff --git a/lustre/target/tgt_lastrcvd.c b/lustre/target/tgt_lastrcvd.c index 6066d59..c31e3f4 100644 --- a/lustre/target/tgt_lastrcvd.c +++ b/lustre/target/tgt_lastrcvd.c @@ -767,8 +767,7 @@ static int tgt_last_rcvd_update(const struct lu_env *env, struct lu_target *tgt, mutex_lock(&ted->ted_lcd_lock); LASSERT(ergo(tti->tti_transno == 0, th->th_result != 0)); - if (lustre_msg_get_opc(req->rq_reqmsg) == MDS_CLOSE || - lustre_msg_get_opc(req->rq_reqmsg) == MDS_DONE_WRITING) { + if (lustre_msg_get_opc(req->rq_reqmsg) == MDS_CLOSE) { transno_p = &ted->ted_lcd->lcd_last_close_transno; ted->ted_lcd->lcd_last_close_xid = req->rq_xid; ted->ted_lcd->lcd_last_close_result = th->th_result; diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index 3b749c4..df777b9 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -209,25 +209,11 @@ check_lustre_mdt_attrs(void) CHECK_VALUE_X(LMAI_RELEASED); CHECK_VALUE_X(LMAC_HSM); - CHECK_VALUE_X(LMAC_SOM); CHECK_VALUE_X(LMAC_NOT_IN_OI); CHECK_VALUE_X(LMAC_FID_ON_OST); } static void -check_som_attrs(void) -{ - BLANK_LINE(); - CHECK_STRUCT(som_attrs); - CHECK_MEMBER(som_attrs, som_compat); - CHECK_MEMBER(som_attrs, som_incompat); - CHECK_MEMBER(som_attrs, som_ioepoch); - CHECK_MEMBER(som_attrs, som_size); - CHECK_MEMBER(som_attrs, som_blocks); - CHECK_MEMBER(som_attrs, som_mountid); -} - -static void check_hsm_attrs(void) { BLANK_LINE(); @@ -940,9 +926,6 @@ check_mdt_body(void) CHECK_VALUE_O(MDS_FMODE_CLOSED); CHECK_VALUE_O(MDS_FMODE_EXEC); - CHECK_VALUE_O(MDS_FMODE_EPOCH); - CHECK_VALUE_O(MDS_FMODE_TRUNC); - CHECK_VALUE_O(MDS_FMODE_SOM); CHECK_VALUE_O(MDS_OPEN_CREATED); CHECK_VALUE_O(MDS_OPEN_CROSS); @@ -982,10 +965,10 @@ check_mdt_ioepoch(void) { BLANK_LINE(); CHECK_STRUCT(mdt_ioepoch); - CHECK_MEMBER(mdt_ioepoch, handle); - CHECK_MEMBER(mdt_ioepoch, ioepoch); - CHECK_MEMBER(mdt_ioepoch, flags); - CHECK_MEMBER(mdt_ioepoch, padding); + CHECK_MEMBER(mdt_ioepoch, mio_handle); + CHECK_MEMBER(mdt_ioepoch, mio_unused1); + CHECK_MEMBER(mdt_ioepoch, mio_unused2); + CHECK_MEMBER(mdt_ioepoch, mio_padding); } static void @@ -2344,16 +2327,6 @@ main(int argc, char **argv) CHECK_VALUE(LUSTRE_BFLAG_UNCOMMITTED_WRITES); - CHECK_VALUE_X(MF_SOM_CHANGE); - CHECK_VALUE_X(MF_EPOCH_OPEN); - CHECK_VALUE_X(MF_EPOCH_CLOSE); - CHECK_VALUE_X(MF_MDC_CANCEL_FID1); - CHECK_VALUE_X(MF_MDC_CANCEL_FID2); - CHECK_VALUE_X(MF_MDC_CANCEL_FID3); - CHECK_VALUE_X(MF_MDC_CANCEL_FID4); - CHECK_VALUE_X(MF_SOM_AU); - CHECK_VALUE_X(MF_GETATTR_LOCK); - CHECK_VALUE_64X(MDS_ATTR_MODE); CHECK_VALUE_64X(MDS_ATTR_UID); CHECK_VALUE_64X(MDS_ATTR_GID); @@ -2473,7 +2446,6 @@ main(int argc, char **argv) CHECK_VALUE(OUT_INDEX_INSERT); CHECK_VALUE(OUT_INDEX_DELETE); - check_som_attrs(); check_hsm_attrs(); check_ost_id(); check_lu_dirent(); diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index f5a7142..7850748 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -236,24 +236,6 @@ void lustre_assert_wire_constants(void) (long long)MDS_STATUS_LOV); LASSERTF(LUSTRE_BFLAG_UNCOMMITTED_WRITES == 1, "found %lld\n", (long long)LUSTRE_BFLAG_UNCOMMITTED_WRITES); - LASSERTF(MF_SOM_CHANGE == 0x00000001UL, "found 0x%.8xUL\n", - (unsigned)MF_SOM_CHANGE); - LASSERTF(MF_EPOCH_OPEN == 0x00000002UL, "found 0x%.8xUL\n", - (unsigned)MF_EPOCH_OPEN); - LASSERTF(MF_EPOCH_CLOSE == 0x00000004UL, "found 0x%.8xUL\n", - (unsigned)MF_EPOCH_CLOSE); - LASSERTF(MF_MDC_CANCEL_FID1 == 0x00000008UL, "found 0x%.8xUL\n", - (unsigned)MF_MDC_CANCEL_FID1); - LASSERTF(MF_MDC_CANCEL_FID2 == 0x00000010UL, "found 0x%.8xUL\n", - (unsigned)MF_MDC_CANCEL_FID2); - LASSERTF(MF_MDC_CANCEL_FID3 == 0x00000020UL, "found 0x%.8xUL\n", - (unsigned)MF_MDC_CANCEL_FID3); - LASSERTF(MF_MDC_CANCEL_FID4 == 0x00000040UL, "found 0x%.8xUL\n", - (unsigned)MF_MDC_CANCEL_FID4); - LASSERTF(MF_SOM_AU == 0x00000080UL, "found 0x%.8xUL\n", - (unsigned)MF_SOM_AU); - LASSERTF(MF_GETATTR_LOCK == 0x00000100UL, "found 0x%.8xUL\n", - (unsigned)MF_GETATTR_LOCK); LASSERTF(MDS_ATTR_MODE == 0x0000000000000001ULL, "found 0x%.16llxULL\n", (long long)MDS_ATTR_MODE); LASSERTF(MDS_ATTR_UID == 0x0000000000000002ULL, "found 0x%.16llxULL\n", @@ -455,8 +437,6 @@ void lustre_assert_wire_constants(void) (unsigned)LMAI_RELEASED); LASSERTF(LMAC_HSM == 0x00000001UL, "found 0x%.8xUL\n", (unsigned)LMAC_HSM); - LASSERTF(LMAC_SOM == 0x00000002UL, "found 0x%.8xUL\n", - (unsigned)LMAC_SOM); LASSERTF(LMAC_NOT_IN_OI == 0x00000004UL, "found 0x%.8xUL\n", (unsigned)LMAC_NOT_IN_OI); LASSERTF(LMAC_FID_ON_OST == 0x00000008UL, "found 0x%.8xUL\n", @@ -486,34 +466,6 @@ void lustre_assert_wire_constants(void) LASSERTF(OUT_INDEX_DELETE == 11, "found %lld\n", (long long)OUT_INDEX_DELETE); - /* Checks for struct som_attrs */ - LASSERTF((int)sizeof(struct som_attrs) == 40, "found %lld\n", - (long long)(int)sizeof(struct som_attrs)); - LASSERTF((int)offsetof(struct som_attrs, som_compat) == 0, "found %lld\n", - (long long)(int)offsetof(struct som_attrs, som_compat)); - LASSERTF((int)sizeof(((struct som_attrs *)0)->som_compat) == 4, "found %lld\n", - (long long)(int)sizeof(((struct som_attrs *)0)->som_compat)); - LASSERTF((int)offsetof(struct som_attrs, som_incompat) == 4, "found %lld\n", - (long long)(int)offsetof(struct som_attrs, som_incompat)); - LASSERTF((int)sizeof(((struct som_attrs *)0)->som_incompat) == 4, "found %lld\n", - (long long)(int)sizeof(((struct som_attrs *)0)->som_incompat)); - LASSERTF((int)offsetof(struct som_attrs, som_ioepoch) == 8, "found %lld\n", - (long long)(int)offsetof(struct som_attrs, som_ioepoch)); - LASSERTF((int)sizeof(((struct som_attrs *)0)->som_ioepoch) == 8, "found %lld\n", - (long long)(int)sizeof(((struct som_attrs *)0)->som_ioepoch)); - LASSERTF((int)offsetof(struct som_attrs, som_size) == 16, "found %lld\n", - (long long)(int)offsetof(struct som_attrs, som_size)); - LASSERTF((int)sizeof(((struct som_attrs *)0)->som_size) == 8, "found %lld\n", - (long long)(int)sizeof(((struct som_attrs *)0)->som_size)); - LASSERTF((int)offsetof(struct som_attrs, som_blocks) == 24, "found %lld\n", - (long long)(int)offsetof(struct som_attrs, som_blocks)); - LASSERTF((int)sizeof(((struct som_attrs *)0)->som_blocks) == 8, "found %lld\n", - (long long)(int)sizeof(((struct som_attrs *)0)->som_blocks)); - LASSERTF((int)offsetof(struct som_attrs, som_mountid) == 32, "found %lld\n", - (long long)(int)offsetof(struct som_attrs, som_mountid)); - LASSERTF((int)sizeof(((struct som_attrs *)0)->som_mountid) == 8, "found %lld\n", - (long long)(int)sizeof(((struct som_attrs *)0)->som_mountid)); - /* Checks for struct hsm_attrs */ LASSERTF((int)sizeof(struct hsm_attrs) == 24, "found %lld\n", (long long)(int)sizeof(struct hsm_attrs)); @@ -2140,12 +2092,6 @@ void lustre_assert_wire_constants(void) MDS_FMODE_CLOSED); LASSERTF(MDS_FMODE_EXEC == 000000000004UL, "found 0%.11oUL\n", MDS_FMODE_EXEC); - LASSERTF(MDS_FMODE_EPOCH == 000001000000UL, "found 0%.11oUL\n", - MDS_FMODE_EPOCH); - LASSERTF(MDS_FMODE_TRUNC == 000002000000UL, "found 0%.11oUL\n", - MDS_FMODE_TRUNC); - LASSERTF(MDS_FMODE_SOM == 000004000000UL, "found 0%.11oUL\n", - MDS_FMODE_SOM); LASSERTF(MDS_OPEN_CREATED == 000000000010UL, "found 0%.11oUL\n", MDS_OPEN_CREATED); LASSERTF(MDS_OPEN_CROSS == 000000000020UL, "found 0%.11oUL\n", @@ -2204,22 +2150,22 @@ void lustre_assert_wire_constants(void) /* Checks for struct mdt_ioepoch */ LASSERTF((int)sizeof(struct mdt_ioepoch) == 24, "found %lld\n", (long long)(int)sizeof(struct mdt_ioepoch)); - LASSERTF((int)offsetof(struct mdt_ioepoch, handle) == 0, "found %lld\n", - (long long)(int)offsetof(struct mdt_ioepoch, handle)); - LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->handle) == 8, "found %lld\n", - (long long)(int)sizeof(((struct mdt_ioepoch *)0)->handle)); - LASSERTF((int)offsetof(struct mdt_ioepoch, ioepoch) == 8, "found %lld\n", - (long long)(int)offsetof(struct mdt_ioepoch, ioepoch)); - LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->ioepoch) == 8, "found %lld\n", - (long long)(int)sizeof(((struct mdt_ioepoch *)0)->ioepoch)); - LASSERTF((int)offsetof(struct mdt_ioepoch, flags) == 16, "found %lld\n", - (long long)(int)offsetof(struct mdt_ioepoch, flags)); - LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->flags) == 4, "found %lld\n", - (long long)(int)sizeof(((struct mdt_ioepoch *)0)->flags)); - LASSERTF((int)offsetof(struct mdt_ioepoch, padding) == 20, "found %lld\n", - (long long)(int)offsetof(struct mdt_ioepoch, padding)); - LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->padding) == 4, "found %lld\n", - (long long)(int)sizeof(((struct mdt_ioepoch *)0)->padding)); + LASSERTF((int)offsetof(struct mdt_ioepoch, mio_handle) == 0, "found %lld\n", + (long long)(int)offsetof(struct mdt_ioepoch, mio_handle)); + LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_handle) == 8, "found %lld\n", + (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_handle)); + LASSERTF((int)offsetof(struct mdt_ioepoch, mio_unused1) == 8, "found %lld\n", + (long long)(int)offsetof(struct mdt_ioepoch, mio_unused1)); + LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_unused1) == 8, "found %lld\n", + (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_unused1)); + LASSERTF((int)offsetof(struct mdt_ioepoch, mio_unused2) == 16, "found %lld\n", + (long long)(int)offsetof(struct mdt_ioepoch, mio_unused2)); + LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_unused2) == 4, "found %lld\n", + (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_unused2)); + LASSERTF((int)offsetof(struct mdt_ioepoch, mio_padding) == 20, "found %lld\n", + (long long)(int)offsetof(struct mdt_ioepoch, mio_padding)); + LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_padding) == 4, "found %lld\n", + (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_padding)); /* Checks for struct mdt_remote_perm */ LASSERTF((int)sizeof(struct mdt_remote_perm) == 32, "found %lld\n",