Whamcloud - gitweb
It is be possible to send the lock handle along with each read
authordeen <deen>
Thu, 14 Aug 2008 13:10:05 +0000 (13:10 +0000)
committerdeen <deen>
Thu, 14 Aug 2008 13:10:05 +0000 (13:10 +0000)
or write request because the client is already doing a lock match
itself so there isn't any reason the OST should have to re-do that
search.

b=15198
i=johann
i=shadow

15 files changed:
lustre/ChangeLog
lustre/include/lustre/lustre_idl.h
lustre/include/obd.h
lustre/lov/lov_obd.c
lustre/mds/mds_lov.c
lustre/obdclass/obdo.c
lustre/obdecho/echo_client.c
lustre/obdfilter/filter.c
lustre/obdfilter/filter_log.c
lustre/osc/osc_request.c
lustre/ost/ost_handler.c
lustre/ptlrpc/wiretest.c
lustre/utils/obdiolib.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index 4b96704..7bf1c3d 100644 (file)
@@ -1313,6 +1313,14 @@ Details    : FIEMAP ioctl will allow an application to efficiently fetch the
              extent information of a file. It can be used to map logical blocks
              in a file to physical blocks in the block device.
 
+Severity   : normal
+Bugzilla   : 15198
+Description: LDLM soft lockups - improvement
+Details    : It is be possible to send the lock handle along with each read
+             or write request because the client is already doing a lock match
+             itself so there isn't any reason the OST should have to re-do that
+             search.
+
 --------------------------------------------------------------------------------
 
 2007-08-10         Cluster File Systems, Inc. <info@clusterfs.com>
index 17b4db6..419b087 100644 (file)
@@ -745,51 +745,6 @@ typedef __u32 obd_count;
 #define OBD_FL_CKSUM_ADLER    (0x00002000)
 #define OBD_FL_CKSUM_ALL      (OBD_FL_CKSUM_CRC32 | OBD_FL_CKSUM_ADLER)
 
-/*
- * This should not be smaller than sizeof(struct lustre_handle) + sizeof(struct
- * llog_cookie) + sizeof(struct ll_fid). Nevertheless struct ll_fid is not
- * longer stored in o_inline, we keep this just for case.
- */
-#define OBD_INLINESZ    80
-
-/* Note: 64-bit types are 64-bit aligned in structure */
-struct obdo {
-        obd_valid               o_valid;        /* hot fields in this obdo */
-        obd_id                  o_id;
-        obd_gr                  o_gr;
-        obd_id                  o_fid;
-        obd_size                o_size;         /* o_size-o_blocks == ost_lvb */
-        obd_time                o_mtime;
-        obd_time                o_atime;
-        obd_time                o_ctime;
-        obd_blocks              o_blocks;       /* brw: cli sent cached bytes */
-        obd_size                o_grant;
-
-        /* 32-bit fields start here: keep an even number of them via padding */
-        obd_blksize             o_blksize;      /* optimal IO blocksize */
-        obd_mode                o_mode;         /* brw: cli sent cache remain */
-        obd_uid                 o_uid;
-        obd_gid                 o_gid;
-        obd_flag                o_flags;
-        obd_count               o_nlink;        /* brw: checksum */
-        obd_count               o_generation;
-        obd_count               o_misc;         /* brw: o_dropped */
-        __u32                   o_easize;       /* epoch in ost writes */
-        __u32                   o_mds;
-        __u32                   o_stripe_idx;   /* holds stripe idx */
-        __u32                   o_padding_1;
-        char                    o_inline[OBD_INLINESZ];
-                                /* lustre_handle + llog_cookie */
-};
-
-#define o_dirty   o_blocks
-#define o_undirty o_mode
-#define o_dropped o_misc
-#define o_cksum   o_nlink
-
-extern void lustre_swab_obdo (struct obdo *o);
-
-
 #define LOV_MAGIC_V1      0x0BD10BD0
 #define LOV_MAGIC         LOV_MAGIC_V1
 #define LOV_MAGIC_JOIN    0x0BD20BD0
@@ -844,11 +799,11 @@ extern void lustre_swab_lov_mds_md(struct lov_mds_md *llm);
 #define OBD_MD_FLFLAGS     (0x00000800ULL) /* flags word */
 #define OBD_MD_FLNLINK     (0x00002000ULL) /* link count */
 #define OBD_MD_FLGENER     (0x00004000ULL) /* generation number */
-#define OBD_MD_FLINLINE    (0x00008000ULL) /* inline data */
+/*#define OBD_MD_FLINLINE    (0x00008000ULL)  inline data. used until 1.6.5 */
 #define OBD_MD_FLRDEV      (0x00010000ULL) /* device number */
 #define OBD_MD_FLEASIZE    (0x00020000ULL) /* extended attribute data */
 #define OBD_MD_LINKNAME    (0x00040000ULL) /* symbolic link target */
-#define OBD_MD_FLHANDLE    (0x00080000ULL) /* file handle */
+#define OBD_MD_FLHANDLE    (0x00080000ULL) /* file/lock handle */
 #define OBD_MD_FLCKSUM     (0x00100000ULL) /* bulk data checksum */
 #define OBD_MD_FLQOS       (0x00200000ULL) /* quality of service stats */
 #define OBD_MD_FLOSCOPQ    (0x00400000ULL) /* osc opaque data */
@@ -888,16 +843,6 @@ extern void lustre_swab_lov_mds_md(struct lov_mds_md *llm);
                           OBD_MD_FLGID   | OBD_MD_FLFLAGS | OBD_MD_FLNLINK | \
                           OBD_MD_FLGENER | OBD_MD_FLRDEV  | OBD_MD_FLGROUP)
 
-static inline struct lustre_handle *obdo_handle(struct obdo *oa)
-{
-        return (struct lustre_handle *)oa->o_inline;
-}
-
-static inline struct llog_cookie *obdo_logcookie(struct obdo *oa)
-{
-        return (struct llog_cookie *)(oa->o_inline +
-                                      sizeof(struct lustre_handle));
-}
 /* don't forget obdo_fid which is way down at the bottom so it can
  * come after the definition of llog_cookie */
 
@@ -967,23 +912,6 @@ struct niobuf_remote {
 
 extern void lustre_swab_niobuf_remote (struct niobuf_remote *nbr);
 
-/* request structure for OST's */
-
-struct ost_body {
-        struct  obdo oa;
-};
-
-/* Key for FIEMAP to be used in get_info calls */
-struct ll_fiemap_info_key {
-        char    name[8];
-        struct  obdo oa;
-        struct  ll_user_fiemap fiemap;
-};
-
-extern void lustre_swab_ost_body (struct ost_body *b);
-extern void lustre_swab_ost_last_id(obd_id *id);
-extern void lustre_swab_fiemap(struct ll_user_fiemap *fiemap);
-
 /* lock value block communicated between the filter and llite */
 
 /* OST_LVB_ERR_INIT is needed because the return code in rc is 
@@ -2161,6 +2089,66 @@ struct lov_user_md_join {         /* LOV EA user data (host-endian) */
         struct lov_user_ost_data_join lmm_objects[0]; /* per-stripe data */
 } __attribute__((packed));
 
+/* Note: 64-bit types are 64-bit aligned in structure */
+struct obdo {
+        obd_valid               o_valid;        /* hot fields in this obdo */
+        obd_id                  o_id;
+        obd_gr                  o_gr;
+        obd_id                  o_fid;
+        obd_size                o_size;         /* o_size-o_blocks == ost_lvb */
+        obd_time                o_mtime;
+        obd_time                o_atime;
+        obd_time                o_ctime;
+        obd_blocks              o_blocks;       /* brw: cli sent cached bytes */
+        obd_size                o_grant;
+
+        /* 32-bit fields start here: keep an even number of them via padding */
+        obd_blksize             o_blksize;      /* optimal IO blocksize */
+        obd_mode                o_mode;         /* brw: cli sent cache remain */
+        obd_uid                 o_uid;
+        obd_gid                 o_gid;
+        obd_flag                o_flags;
+        obd_count               o_nlink;        /* brw: checksum */
+        obd_count               o_generation;
+        obd_count               o_misc;         /* brw: o_dropped */
+        __u32                   o_easize;       /* epoch in ost writes */
+        __u32                   o_mds;
+        __u32                   o_stripe_idx;   /* holds stripe idx */
+        __u32                   o_padding_1;
+        struct lustre_handle    o_handle;       /* brw: lock handle to prolong locks */
+        struct llog_cookie      o_lcookie;      /* destroy: unlink cookie from MDS */
+
+        __u64                   o_padding_2;
+        __u64                   o_padding_3;
+        __u64                   o_padding_4;
+        __u64                   o_padding_5;
+        __u64                   o_padding_6;
+};
+
+#define o_dirty   o_blocks
+#define o_undirty o_mode
+#define o_dropped o_misc
+#define o_cksum   o_nlink
+
+extern void lustre_swab_obdo (struct obdo *o);
+
+/* request structure for OST's */
+
+struct ost_body {
+        struct  obdo oa;
+};
+
+/* Key for FIEMAP to be used in get_info calls */
+struct ll_fiemap_info_key {
+        char    name[8];
+        struct  obdo oa;
+        struct  ll_user_fiemap fiemap;
+};
+
+extern void lustre_swab_ost_body (struct ost_body *b);
+extern void lustre_swab_ost_last_id(obd_id *id);
+extern void lustre_swab_fiemap(struct ll_user_fiemap *fiemap);
+
 extern void lustre_swab_lov_user_md(struct lov_user_md *lum);
 extern void lustre_swab_lov_user_md_objects(struct lov_user_md *lum);
 extern void lustre_swab_lov_user_md_join(struct lov_user_md_join *lumj);
index 00e4a06..88c4375 100644 (file)
@@ -786,6 +786,8 @@ struct obd_trans_info {
         /* initial thread handling transaction */
         int                      oti_thread_id;
         __u32                    oti_conn_cnt;
+
+        struct obd_uuid         *oti_ost_uuid;
 };
 
 static inline void oti_init(struct obd_trans_info *oti,
index 25de713..64d9291 100644 (file)
@@ -1042,8 +1042,8 @@ static int lov_clear_orphans(struct obd_export *export, struct obdo *src_oa,
         if (tmp_oa == NULL)
                 RETURN(-ENOMEM);
 
-        if (src_oa->o_valid & OBD_MD_FLINLINE) {
-                ost_uuid = (struct obd_uuid *)src_oa->o_inline;
+        if (oti->oti_ost_uuid) {
+                ost_uuid = oti->oti_ost_uuid;
                 CDEBUG(D_HA, "clearing orphans only for %s\n",
                        ost_uuid->uuid);
         }
@@ -1386,8 +1386,8 @@ static int lov_setattr(struct obd_export *exp, struct obd_info *oinfo,
                                             OBD_MD_FLMTIME | OBD_MD_FLCTIME |
                                             OBD_MD_FLFLAGS | OBD_MD_FLSIZE |
                                             OBD_MD_FLGROUP | OBD_MD_FLUID |
-                                            OBD_MD_FLGID | OBD_MD_FLINLINE |
-                                            OBD_MD_FLFID | OBD_MD_FLGENER)));
+                                            OBD_MD_FLGID | OBD_MD_FLFID |
+                                            OBD_MD_FLGENER)));
         lov = &exp->exp_obd->u.lov;
         rc = lov_prep_setattr_set(exp, oinfo, oti, &set);
         if (rc)
index 916578f..d2b1462 100644 (file)
@@ -309,10 +309,8 @@ int mds_lov_clear_orphans(struct mds_obd *mds, struct obd_uuid *ost_uuid)
         oa.o_flags = OBD_FL_DELORPHAN;
         oa.o_gr = FILTER_GROUP_MDS0 + mds->mds_id;
         oa.o_valid = OBD_MD_FLFLAGS | OBD_MD_FLGROUP;
-        if (ost_uuid != NULL) {
-                memcpy(&oa.o_inline, ost_uuid, sizeof(*ost_uuid));
-                oa.o_valid |= OBD_MD_FLINLINE;
-        }
+        if (ost_uuid != NULL)
+                oti.oti_ost_uuid = ost_uuid;       
         rc = obd_create(mds->mds_osc_exp, &oa, &empty_ea, &oti);
 
         RETURN(rc);
index 6dc0ffe..88c7011 100644 (file)
@@ -56,9 +56,6 @@
 void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_flag valid)
 {
 #ifdef __KERNEL__
-        CLASSERT(sizeof(struct lustre_handle) +
-                 sizeof(struct llog_cookie) <= sizeof(src->o_inline));
-        
         CDEBUG(D_INODE, "src obdo "LPX64" valid "LPX64", dst obdo "LPX64"\n",
                src->o_id, src->o_valid, dst->o_id);
 #endif
@@ -86,8 +83,10 @@ void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_flag valid)
                 dst->o_flags = src->o_flags;
         if (valid & OBD_MD_FLGENER)
                 dst->o_generation = src->o_generation;
-        if (valid & OBD_MD_FLINLINE)
-                memcpy(dst->o_inline, src->o_inline, sizeof(src->o_inline));
+        if (valid & OBD_MD_FLHANDLE)
+                dst->o_handle = src->o_handle;
+        if (valid & OBD_MD_FLCOOKIE)
+                dst->o_lcookie = src->o_lcookie;
 
         dst->o_valid |= valid;
 }
index 7f59023..9eee5fb 100644 (file)
@@ -1021,7 +1021,7 @@ echo_client_enqueue(struct obd_export *exp, struct obdo *oa,
 {
         struct obd_device      *obd = exp->exp_obd;
         struct echo_client_obd *ec = &obd->u.echo_client;
-        struct lustre_handle   *ulh = obdo_handle (oa);
+        struct lustre_handle   *ulh = &oa->o_handle;
         struct ldlm_enqueue_info einfo = { 0 };
         struct obd_info oinfo = { { { 0 } } };
         struct ec_object       *eco;
@@ -1089,7 +1089,7 @@ echo_client_cancel(struct obd_export *exp, struct obdo *oa)
 {
         struct obd_device      *obd = exp->exp_obd;
         struct echo_client_obd *ec = &obd->u.echo_client;
-        struct lustre_handle   *ulh = obdo_handle (oa);
+        struct lustre_handle   *ulh = &oa->o_handle;
         struct ec_lock         *ecl = NULL;
         int                     found = 0;
         struct list_head       *el;
index edd5cb8..0d138e1 100644 (file)
@@ -3120,7 +3120,7 @@ int filter_setattr_internal(struct obd_export *exp, struct dentry *dentry,
         if (oa->o_valid & OBD_MD_FLCOOKIE) {
                 OBD_ALLOC(fcc, sizeof(*fcc));
                 if (fcc != NULL)
-                        memcpy(fcc, obdo_logcookie(oa), sizeof(*fcc));
+                        *fcc = oa->o_lcookie;
         }
 
         if (ia_valid & ATTR_SIZE || ia_valid & (ATTR_UID | ATTR_GID)) {
@@ -3860,7 +3860,7 @@ int filter_destroy(struct obd_export *exp, struct obdo *oa,
                 if (oa->o_valid & OBD_MD_FLCOOKIE) {
                         struct llog_ctxt *ctxt;
                         struct obd_llog_group *olg;
-                        fcc = obdo_logcookie(oa);
+                        fcc = &oa->o_lcookie;
                         olg = filter_find_olg(obd, oa->o_gr);
                         if (!olg) {
                                CERROR(" %s: can not find olg of group %d\n",
@@ -3883,7 +3883,7 @@ int filter_destroy(struct obd_export *exp, struct obdo *oa,
         if (oa->o_valid & OBD_MD_FLCOOKIE) {
                 OBD_ALLOC(fcc, sizeof(*fcc));
                 if (fcc != NULL)
-                        memcpy(fcc, obdo_logcookie(oa), sizeof(*fcc));
+                        *fcc = oa->o_lcookie;
         }
         DQUOT_INIT(dchild->d_inode);
 
index b2c42d1..26c8399 100644 (file)
@@ -170,7 +170,7 @@ static int filter_recov_log_unlink_cb(struct llog_ctxt *ctxt,
         oa->o_id = lur->lur_oid;
         oa->o_gr = lur->lur_ogen;
         oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
-        memcpy(obdo_logcookie(oa), cookie, sizeof(*cookie));
+        oa->o_lcookie = *cookie;
         oid = oa->o_id;
 
         rc = filter_destroy(exp, oa, NULL, NULL, NULL);
@@ -213,7 +213,7 @@ static int filter_recov_log_setattr_cb(struct llog_ctxt *ctxt,
         oinfo.oi_oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
         oinfo.oi_oa->o_uid = lsr->lsr_uid;
         oinfo.oi_oa->o_gid = lsr->lsr_gid;
-        memcpy(obdo_logcookie(oinfo.oi_oa), cookie, sizeof(*cookie));
+        oinfo.oi_oa->o_lcookie = *cookie;
         oid = oinfo.oi_oa->o_id;
 
         rc = filter_setattr(exp, &oinfo, NULL);
index 22f3dcd..b79cfd4 100644 (file)
@@ -390,7 +390,7 @@ static int osc_setattr_async(struct obd_export *exp, struct obd_info *oinfo,
 
         if (oinfo->oi_oa->o_valid & OBD_MD_FLCOOKIE) {
                 LASSERT(oti);
-                *obdo_logcookie(oinfo->oi_oa) = *oti->oti_logcookies;
+                oinfo->oi_oa->o_lcookie = *oti->oti_logcookies;
         }
 
         /* do mds to ost setattr asynchronouly */
@@ -445,9 +445,8 @@ int osc_real_create(struct obd_export *exp, struct obdo *oa,
 
         ptlrpc_request_set_replen(req);
 
-        if (oa->o_valid & OBD_MD_FLINLINE) {
-                LASSERT((oa->o_valid & OBD_MD_FLFLAGS) &&
-                        oa->o_flags == OBD_FL_DELORPHAN);
+        if ((oa->o_valid & OBD_MD_FLFLAGS) &&
+            oa->o_flags == OBD_FL_DELORPHAN) {
                 DEBUG_REQ(D_HA, req,
                           "delorphan from OST integration");
                 /* Don't resend the delorphan req */
@@ -482,7 +481,7 @@ int osc_real_create(struct obd_export *exp, struct obdo *oa,
                 if (oa->o_valid & OBD_MD_FLCOOKIE) {
                         if (!oti->oti_logcookies)
                                 oti_alloc_cookies(oti, 1);
-                        *oti->oti_logcookies = *obdo_logcookie(oa);
+                        *oti->oti_logcookies = oa->o_lcookie;
                 }
         }
 
@@ -713,8 +712,7 @@ static int osc_destroy(struct obd_export *exp, struct obdo *oa,
         ptlrpc_at_set_req_timeout(req);
 
         if (oti != NULL && oa->o_valid & OBD_MD_FLCOOKIE)
-                memcpy(obdo_logcookie(oa), oti->oti_logcookies,
-                       sizeof(*oti->oti_logcookies));
+                oa->o_lcookie = *oti->oti_logcookies;
         body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
         LASSERT(body);
         body->oa = *oa;
@@ -2098,6 +2096,7 @@ static struct ptlrpc_request *osc_build_req(struct client_obd *cli,
         void *caller_data = NULL;
         struct obd_capa *ocapa;
         struct osc_async_page *oap;
+        struct ldlm_lock *lock = NULL;
         int i, rc;
 
         ENTRY;
@@ -2116,6 +2115,7 @@ static struct ptlrpc_request *osc_build_req(struct client_obd *cli,
                 if (ops == NULL) {
                         ops = oap->oap_caller_ops;
                         caller_data = oap->oap_caller_data;
+                        lock = oap->oap_ldlm_lock;
                 }
                 pga[i] = &oap->oap_brw_page;
                 pga[i]->off = oap->oap_obj_off + oap->oap_page_off;
@@ -2128,6 +2128,10 @@ static struct ptlrpc_request *osc_build_req(struct client_obd *cli,
         LASSERT(ops != NULL);
         ops->ap_fill_obdo(caller_data, cmd, oa);
         ocapa = ops->ap_lookup_capa(caller_data, cmd);
+        if (lock) {
+                oa->o_handle = lock->l_remote_handle;
+                oa->o_valid |= OBD_MD_FLHANDLE;
+        }
 
         sort_brw_pages(pga, page_count);
         rc = osc_brw_prep_request(cmd, cli, oa, NULL, page_count,
index 2b0e3a2..8a32c09 100644 (file)
@@ -120,7 +120,7 @@ static int ost_destroy(struct obd_export *exp, struct ptlrpc_request *req,
                 RETURN(rc);
 
         if (body->oa.o_valid & OBD_MD_FLCOOKIE)
-                oti->oti_logcookies = obdo_logcookie(&body->oa);
+                oti->oti_logcookies = &body->oa.o_lcookie;
         repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
                                  sizeof(*repbody));
         memcpy(&repbody->oa, &body->oa, sizeof(body->oa));
@@ -200,7 +200,7 @@ static int ost_create(struct obd_export *exp, struct ptlrpc_request *req,
         repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
                                  sizeof(*repbody));
         memcpy(&repbody->oa, &body->oa, sizeof(body->oa));
-        oti->oti_logcookies = obdo_logcookie(&repbody->oa);
+        oti->oti_logcookies = &repbody->oa.o_lcookie;
         req->rq_status = obd_create(exp, &repbody->oa, NULL, oti);
         //obd_log_cancel(conn, NULL, 1, oti->oti_logcookies, 0);
         RETURN(0);
@@ -654,7 +654,8 @@ static int ost_prolong_locks_iter(struct ldlm_lock *lock, void *data)
 }
 
 static void ost_prolong_locks(struct obd_export *exp, struct obd_ioobj *obj,
-                              struct niobuf_remote *nb, ldlm_mode_t mode)
+                              struct niobuf_remote *nb, struct obdo *oa,
+                              ldlm_mode_t mode)
 {
         struct ldlm_res_id res_id;
         int nrbufs = obj->ioo_bufcnt;
@@ -672,8 +673,23 @@ static void ost_prolong_locks(struct obd_export *exp, struct obd_ioobj *obj,
         CDEBUG(D_DLMTRACE,"refresh locks: "LPU64"/"LPU64" ("LPU64"->"LPU64")\n",
                res_id.name[0], res_id.name[1], opd.opd_policy.l_extent.start,
                opd.opd_policy.l_extent.end);
+
+        if (oa->o_valid & OBD_MD_FLHANDLE) {
+                struct ldlm_lock *lock;
+
+                lock = ldlm_handle2lock(&oa->o_handle);
+                if (lock != NULL) {
+                        ost_prolong_locks_iter(lock, &opd);
+                        LDLM_LOCK_PUT(lock);
+                        EXIT;
+                        return;
+                }
+        }
+
         ldlm_resource_iterate(exp->exp_obd->obd_namespace, &res_id,
                               ost_prolong_locks_iter, &opd);
+
+        EXIT;
 }
 
 static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti)
@@ -797,7 +813,7 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti)
         if (rc != 0)
                 GOTO(out_lock, rc);
 
-        ost_prolong_locks(exp, ioo, pp_rnb, LCK_PW | LCK_PR);
+        ost_prolong_locks(exp, ioo, pp_rnb, &body->oa, LCK_PW | LCK_PR);
 
         nob = 0;
         for (i = 0; i < npages; i++) {
@@ -1095,7 +1111,7 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
                 GOTO(out_lock, rc = -ETIMEDOUT);
         }
 
-        ost_prolong_locks(exp, ioo, pp_rnb, LCK_PW);
+        ost_prolong_locks(exp, ioo, pp_rnb, &body->oa, LCK_PW);
 
         /* obd_preprw clobbers oa->valid, so save what we need */
         if (body->oa.o_valid & OBD_MD_FLCKSUM) {
index b1da059..4b44935 100644 (file)
@@ -573,12 +573,34 @@ void lustre_assert_wire_constants(void)
                  (long long)(int)offsetof(struct obdo, o_padding_1));
         LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_1) == 4, " found %lld\n",
                  (long long)(int)sizeof(((struct obdo *)0)->o_padding_1));
-        LASSERTF((int)offsetof(struct obdo, o_inline) == 128, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_inline));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_inline) == 80, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_inline));
-        LASSERTF(OBD_INLINESZ == 80, " found %lld\n",
-                 (long long)OBD_INLINESZ);
+        LASSERTF((int)offsetof(struct obdo, o_handle) == 128, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_handle));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_handle) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_handle));
+        LASSERTF((int)offsetof(struct obdo, o_lcookie) == 136, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_lcookie));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_lcookie) == 32, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_lcookie));
+        LASSERTF((int)offsetof(struct obdo, o_padding_2) == 168, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_padding_2));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_2) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_padding_2));
+        LASSERTF((int)offsetof(struct obdo, o_padding_3) == 176, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_padding_3));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_3) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_padding_3));
+        LASSERTF((int)offsetof(struct obdo, o_padding_4) == 184, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_padding_4));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_4) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_padding_4));
+        LASSERTF((int)offsetof(struct obdo, o_padding_5) == 192, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_padding_5));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_5) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_padding_5));
+        LASSERTF((int)offsetof(struct obdo, o_padding_6) == 200, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_padding_6));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_6) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_padding_6));
         CLASSERT(OBD_MD_FLID == (0x00000001ULL));
         CLASSERT(OBD_MD_FLATIME == (0x00000002ULL));
         CLASSERT(OBD_MD_FLMTIME == (0x00000004ULL));
@@ -593,7 +615,6 @@ void lustre_assert_wire_constants(void)
         CLASSERT(OBD_MD_FLFLAGS == (0x00000800ULL));
         CLASSERT(OBD_MD_FLNLINK == (0x00002000ULL));
         CLASSERT(OBD_MD_FLGENER == (0x00004000ULL));
-        CLASSERT(OBD_MD_FLINLINE == (0x00008000ULL));
         CLASSERT(OBD_MD_FLRDEV == (0x00010000ULL));
         CLASSERT(OBD_MD_FLEASIZE == (0x00020000ULL));
         CLASSERT(OBD_MD_LINKNAME == (0x00040000ULL));
index e6f715f..64f0ce4 100644 (file)
@@ -180,7 +180,7 @@ obdio_enqueue (struct obdio_conn *conn, __u64 oid,
         rc = obdio_ioctl (conn, ECHO_IOC_ENQUEUE);
 
         if (rc == 0)
-                memcpy (lh, obdo_handle (&conn->oc_data.ioc_obdo1), sizeof (*lh));
+                *lh = conn->oc_data.ioc_obdo1.o_handle;
 
         return (rc);
 }
@@ -190,7 +190,7 @@ obdio_cancel (struct obdio_conn *conn, struct lustre_handle *lh)
 {
         obdio_iocinit (conn);
 
-        memcpy (obdo_handle (&conn->oc_data.ioc_obdo1), lh, sizeof (*lh));
+        conn->oc_data.ioc_obdo1.o_handle = *lh;
         conn->oc_data.ioc_obdo1.o_valid = OBD_MD_FLHANDLE;
 
         return (obdio_ioctl (conn, ECHO_IOC_CANCEL));
index a2f72c4..9dab8b5 100644 (file)
@@ -246,9 +246,13 @@ check_obdo(void)
         CHECK_MEMBER(obdo, o_mds);
         CHECK_MEMBER(obdo, o_stripe_idx);
         CHECK_MEMBER(obdo, o_padding_1);
-        CHECK_MEMBER(obdo, o_inline);
-
-        CHECK_VALUE(OBD_INLINESZ);
+        CHECK_MEMBER(obdo, o_handle);
+        CHECK_MEMBER(obdo, o_lcookie);
+        CHECK_MEMBER(obdo, o_padding_2);
+        CHECK_MEMBER(obdo, o_padding_3);
+        CHECK_MEMBER(obdo, o_padding_4);
+        CHECK_MEMBER(obdo, o_padding_5);
+        CHECK_MEMBER(obdo, o_padding_6);       
 
         CHECK_CDEFINE(OBD_MD_FLID);
         CHECK_CDEFINE(OBD_MD_FLATIME);
@@ -264,7 +268,6 @@ check_obdo(void)
         CHECK_CDEFINE(OBD_MD_FLFLAGS);
         CHECK_CDEFINE(OBD_MD_FLNLINK);
         CHECK_CDEFINE(OBD_MD_FLGENER);
-        CHECK_CDEFINE(OBD_MD_FLINLINE);
         CHECK_CDEFINE(OBD_MD_FLRDEV);
         CHECK_CDEFINE(OBD_MD_FLEASIZE);
         CHECK_CDEFINE(OBD_MD_LINKNAME);
index bd2d559..ca04329 100644 (file)
@@ -570,12 +570,34 @@ void lustre_assert_wire_constants(void)
                  (long long)(int)offsetof(struct obdo, o_padding_1));
         LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_1) == 4, " found %lld\n",
                  (long long)(int)sizeof(((struct obdo *)0)->o_padding_1));
-        LASSERTF((int)offsetof(struct obdo, o_inline) == 128, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_inline));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_inline) == 80, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_inline));
-        LASSERTF(OBD_INLINESZ == 80, " found %lld\n",
-                 (long long)OBD_INLINESZ);
+        LASSERTF((int)offsetof(struct obdo, o_handle) == 128, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_handle));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_handle) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_handle));
+        LASSERTF((int)offsetof(struct obdo, o_lcookie) == 136, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_lcookie));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_lcookie) == 32, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_lcookie));
+        LASSERTF((int)offsetof(struct obdo, o_padding_2) == 168, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_padding_2));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_2) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_padding_2));
+        LASSERTF((int)offsetof(struct obdo, o_padding_3) == 176, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_padding_3));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_3) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_padding_3));
+        LASSERTF((int)offsetof(struct obdo, o_padding_4) == 184, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_padding_4));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_4) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_padding_4));
+        LASSERTF((int)offsetof(struct obdo, o_padding_5) == 192, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_padding_5));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_5) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_padding_5));
+        LASSERTF((int)offsetof(struct obdo, o_padding_6) == 200, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_padding_6));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_6) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_padding_6));
         CLASSERT(OBD_MD_FLID == (0x00000001ULL));
         CLASSERT(OBD_MD_FLATIME == (0x00000002ULL));
         CLASSERT(OBD_MD_FLMTIME == (0x00000004ULL));
@@ -590,7 +612,6 @@ void lustre_assert_wire_constants(void)
         CLASSERT(OBD_MD_FLFLAGS == (0x00000800ULL));
         CLASSERT(OBD_MD_FLNLINK == (0x00002000ULL));
         CLASSERT(OBD_MD_FLGENER == (0x00004000ULL));
-        CLASSERT(OBD_MD_FLINLINE == (0x00008000ULL));
         CLASSERT(OBD_MD_FLRDEV == (0x00010000ULL));
         CLASSERT(OBD_MD_FLEASIZE == (0x00020000ULL));
         CLASSERT(OBD_MD_LINKNAME == (0x00040000ULL));