Whamcloud - gitweb
LU-6017 obd: remove destroy cookie handling 22/12922/9
authorJohn L. Hammond <john.hammond@intel.com>
Wed, 3 Dec 2014 21:05:44 +0000 (15:05 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 17 May 2015 22:47:56 +0000 (22:47 +0000)
Clients no longer need to track the max and default MDS cookiesizes
so remove
  the obsolete obod o_valid flag OBD_MD_FLCOOKIE,
  the struct client_obd members cl_{default,max}_mds_cookiesize,
  the struct obd_trans_info and parameters of this type,
  the get info keys KEY_{DEFAULT,MAX}_COOKIESIZE,
  the cookiesize parameters from md_init_ea_size(),
  the files llite/*/{default,max}_cookiesize, and
  any code that needlessly handled these values.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I95f0dae370998006ec366a252891db531759ea7d
Reviewed-on: http://review.whamcloud.com/12922
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
31 files changed:
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_mdc.h
lustre/include/md_object.h
lustre/include/obd.h
lustre/include/obd_class.h
lustre/ldlm/ldlm_lib.c
lustre/llite/lcommon_misc.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/lproc_llite.c
lustre/lmv/lmv_obd.c
lustre/lov/lov_cl_internal.h
lustre/lov/lov_internal.h
lustre/lov/lov_request.c
lustre/mdc/mdc_locks.c
lustre/mdc/mdc_reint.c
lustre/mdc/mdc_request.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_open.c
lustre/obdclass/obdo.c
lustre/obdecho/echo.c
lustre/obdecho/echo_client.c
lustre/ofd/ofd_internal.h
lustre/ofd/ofd_io.c
lustre/ofd/ofd_obd.c
lustre/osc/osc_request.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/wiretest.c
lustre/target/tgt_handler.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index d758c8c..64fc8a3 100644 (file)
@@ -1750,7 +1750,7 @@ lov_mds_md_max_stripe_count(size_t buf_size, __u32 lmm_magic)
 #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, never used */
-#define OBD_MD_FLCOOKIE    (0x00800000ULL) /* log cancellation cookie */
+/*     OBD_MD_FLCOOKIE    (0x00800000ULL)    obsolete in 2.8 */
 #define OBD_MD_FLGROUP     (0x01000000ULL) /* group */
 #define OBD_MD_FLFID       (0x02000000ULL) /* ->ost write inline fid */
 #define OBD_MD_FLEPOCH     (0x04000000ULL) /* ->ost write with ioepoch */
@@ -2279,7 +2279,7 @@ struct mdt_body {
        __u32   mbo_eadatasize;
        __u32   mbo_aclsize;
        __u32   mbo_max_mdsize;
-       __u32   mbo_max_cookiesize;
+       __u32   mbo_unused3; /* was max_cookiesize until 2.8 */
        __u32   mbo_uid_h; /* high 32-bits of uid, for FUID */
        __u32   mbo_gid_h; /* high 32-bits of gid, for FUID */
        __u32   mbo_padding_5; /* also fix lustre_swab_mdt_body */
@@ -3475,7 +3475,8 @@ struct obdo {
        struct lustre_handle    o_handle;       /* brw: lock handle to prolong
                                                 * locks */
        struct llog_cookie      o_lcookie;      /* destroy: unlink cookie from
-                                                * MDS */
+                                                * MDS, obsolete in 2.8, reused
+                                                * in OSP */
        __u32                   o_uid_h;
        __u32                   o_gid_h;
 
index 7b09164..7ca89dc 100644 (file)
@@ -166,15 +166,14 @@ static inline void mdc_put_rpc_lock(struct mdc_rpc_lock *lck,
 }
 
 /**
- * Update the maximum possible easize and cookiesize.
+ * Update the maximum possible easize.
  *
- * The values are learned from ptlrpc replies sent by the MDT.  The
- * default easize and cookiesize is initialized to the minimum value but
- * allowed to grow up to a single page in size if required to handle the
- * common case.
+ * This value is learned from ptlrpc replies sent by the MDT.  The
+ * default easize is initialized to the minimum value but allowed to
+ * grow up to a single page in size if required to handle the common
+ * case.
  *
- * \see client_obd::cl_default_mds_easize and
- * client_obd::cl_default_mds_cookiesize
+ * \see client_obd::cl_default_mds_easize
  *
  * \param[in] exp      export for MDC device
  * \param[in] body     body of ptlrpc reply from MDT
@@ -186,7 +185,6 @@ static inline void mdc_update_max_ea_from_body(struct obd_export *exp,
        if (body->mbo_valid & OBD_MD_FLMODEASIZE) {
                struct client_obd *cli = &exp->exp_obd->u.cli;
                __u32 def_easize;
-               __u32 def_cookiesize;
 
                if (cli->cl_max_mds_easize < body->mbo_max_mdsize)
                        cli->cl_max_mds_easize = body->mbo_max_mdsize;
@@ -194,13 +192,6 @@ static inline void mdc_update_max_ea_from_body(struct obd_export *exp,
                def_easize = min_t(__u32, body->mbo_max_mdsize,
                                   OBD_MAX_DEFAULT_EA_SIZE);
                cli->cl_default_mds_easize = def_easize;
-
-               if (cli->cl_max_mds_cookiesize < body->mbo_max_cookiesize)
-                       cli->cl_max_mds_cookiesize = body->mbo_max_cookiesize;
-
-               def_cookiesize = min_t(__u32, body->mbo_max_cookiesize,
-                                      OBD_MAX_DEFAULT_COOKIE_SIZE);
-               cli->cl_default_mds_cookiesize = def_cookiesize;
        }
 }
 
index ebc48e2..2da5847 100644 (file)
@@ -69,16 +69,15 @@ struct obd_export;
 
 /** metadata attributes */
 enum ma_valid {
-       MA_INODE     = (1 << 0),
-       MA_LOV       = (1 << 1),
-       MA_COOKIE    = (1 << 2),
-       MA_FLAGS     = (1 << 3),
-       MA_LMV       = (1 << 4),
-       MA_ACL_DEF   = (1 << 5),
-       MA_LOV_DEF   = (1 << 6),
-       MA_HSM       = (1 << 7),
-       MA_PFID      = (1 << 8),
-       MA_LMV_DEF   = (1 << 9),
+       MA_INODE     = 1 << 0,
+       MA_LOV       = 1 << 1,
+       MA_FLAGS     = 1 << 2,
+       MA_LMV       = 1 << 3,
+       MA_ACL_DEF   = 1 << 4,
+       MA_LOV_DEF   = 1 << 5,
+       MA_HSM       = 1 << 6,
+       MA_PFID      = 1 << 7,
+       MA_LMV_DEF   = 1 << 8,
 };
 
 typedef enum {
index f83454f..f82f3d1 100644 (file)
@@ -213,7 +213,6 @@ enum {
  * on the MDS.
  */
 #define OBD_MAX_DEFAULT_EA_SIZE                4096
-#define OBD_MAX_DEFAULT_COOKIE_SIZE    4096
 
 struct mdc_rpc_lock;
 struct obd_import;
@@ -223,7 +222,7 @@ struct client_obd {
        struct obd_import       *cl_import; /* ptlrpc connection state */
        size_t                   cl_conn_count;
 
-       /* Cache maximum and default values for easize and cookiesize. This is
+       /* Cache maximum and default values for easize. This is
         * strictly a performance optimization to minimize calls to
         * obd_size_diskmd(). The default values are used to calculate the
         * initial size of a request buffer. The ptlrpc layer will resize the
@@ -243,18 +242,6 @@ struct client_obd {
         * run-time if a larger observed size is advertised by the MDT. */
        __u32                    cl_max_mds_easize;
 
-       /* Default cookie size for llog cookies (see struct llog_cookie). It is
-        * initialized to zero at mount-time, then it tracks the largest
-        * observed cookie size advertised by the MDT, up to a maximum value of
-        * OBD_MAX_DEFAULT_COOKIE_SIZE. Note that llog_cookies are not
-        * used by clients communicating with MDS versions 2.4.0 and later.*/
-       __u32                    cl_default_mds_cookiesize;
-
-       /* Maximum possible cookie size computed at mount-time based on
-        * the number of OSTs in the filesystem. May be increased at
-        * run-time if a larger observed size is advertised by the MDT. */
-       __u32                    cl_max_mds_cookiesize;
-
        enum lustre_sec_part     cl_sp_me;
        enum lustre_sec_part     cl_sp_to;
        struct sptlrpc_flavor    cl_flvr_mgc; /* fixed flavor of mgc->mgs */
@@ -457,8 +444,6 @@ struct lmv_obd {
        int                     connected;
        int                     max_easize;
        int                     max_def_easize;
-       int                     max_cookiesize;
-       int                     max_def_cookiesize;
 
        __u32                   tgts_size; /* size of tgts array */
        struct lmv_tgt_desc     **tgts;
@@ -511,21 +496,6 @@ struct niobuf_local {
 #define LUSTRE_MGS_OBDNAME "MGS"
 #define LUSTRE_MGC_OBDNAME "MGC"
 
-struct obd_trans_info {
-       __u64                    oti_xid;
-       /* Only used on the server side for tracking acks. */
-       struct oti_req_ack_lock {
-               struct lustre_handle    lock;
-               __u32                   mode;
-       }                        oti_ack_locks[4];
-       void                    *oti_handle;
-       struct llog_cookie       oti_onecookie;
-       struct llog_cookie      *oti_logcookies;
-
-       /** VBR: versions */
-       __u64                    oti_pre_version;
-};
-
 /*
  * Events signalled through obd_notify() upcall-chain.
  */
@@ -757,8 +727,6 @@ enum obd_cleanup_stage {
 #define KEY_LOVDESC             "lovdesc"
 #define KEY_MAX_EASIZE         "max_easize"
 #define KEY_DEFAULT_EASIZE     "default_easize"
-#define KEY_MAX_COOKIESIZE     "max_cookiesize"
-#define KEY_DEFAULT_COOKIESIZE "default_cookiesize"
 #define KEY_MGSSEC              "mgssec"
 #define KEY_READ_ONLY           "read-only"
 #define KEY_REGISTER_TARGET     "register_target"
@@ -951,24 +919,22 @@ struct obd_ops {
         int (*o_unpackmd)(struct obd_export *exp,struct lov_stripe_md **mem_tgt,
                           struct lov_mds_md *disk_src, int disk_len);
        int (*o_create)(const struct lu_env *env, struct obd_export *exp,
-                       struct obdo *oa, struct obd_trans_info *oti);
+                       struct obdo *oa);
        int (*o_destroy)(const struct lu_env *env, struct obd_export *exp,
-                        struct obdo *oa, struct obd_trans_info *oti);
-        int (*o_setattr)(const struct lu_env *, struct obd_export *exp,
-                         struct obd_info *oinfo, struct obd_trans_info *oti);
+                        struct obdo *oa);
+       int (*o_setattr)(const struct lu_env *, struct obd_export *exp,
+                        struct obd_info *oinfo);
         int (*o_getattr)(const struct lu_env *env, struct obd_export *exp,
                          struct obd_info *oinfo);
-        int (*o_preprw)(const struct lu_env *env, int cmd,
-                        struct obd_export *exp, struct obdo *oa, int objcount,
-                        struct obd_ioobj *obj, struct niobuf_remote *remote,
-                       int *nr_pages, struct niobuf_local *local,
-                       struct obd_trans_info *oti);
-        int (*o_commitrw)(const struct lu_env *env, int cmd,
-                          struct obd_export *exp, struct obdo *oa,
-                          int objcount, struct obd_ioobj *obj,
-                          struct niobuf_remote *remote, int pages,
-                          struct niobuf_local *local,
-                          struct obd_trans_info *oti, int rc);
+       int (*o_preprw)(const struct lu_env *env, int cmd,
+                       struct obd_export *exp, struct obdo *oa, int objcount,
+                       struct obd_ioobj *obj, struct niobuf_remote *remote,
+                       int *nr_pages, struct niobuf_local *local);
+       int (*o_commitrw)(const struct lu_env *env, int cmd,
+                         struct obd_export *exp, struct obdo *oa,
+                         int objcount, struct obd_ioobj *obj,
+                         struct niobuf_remote *remote, int pages,
+                         struct niobuf_local *local, int rc);
         int (*o_init_export)(struct obd_export *exp);
         int (*o_destroy_export)(struct obd_export *exp);
 
@@ -1120,7 +1086,7 @@ struct md_ops {
        int (*m_getattr_name)(struct obd_export *, struct md_op_data *,
                              struct ptlrpc_request **);
 
-       int (*m_init_ea_size)(struct obd_export *, __u32, __u32, __u32, __u32);
+       int (*m_init_ea_size)(struct obd_export *, __u32, __u32);
 
        int (*m_get_lustre_md)(struct obd_export *, struct ptlrpc_request *,
                               struct obd_export *, struct obd_export *,
index e6b388b..c4ba2fc 100644 (file)
@@ -764,7 +764,7 @@ static inline int obd_free_memmd(struct obd_export *exp,
 }
 
 static inline int obd_create(const struct lu_env *env, struct obd_export *exp,
-                            struct obdo *obdo, struct obd_trans_info *oti)
+                            struct obdo *obdo)
 {
        int rc;
        ENTRY;
@@ -772,12 +772,12 @@ static inline int obd_create(const struct lu_env *env, struct obd_export *exp,
        EXP_CHECK_DT_OP(exp, create);
        EXP_COUNTER_INCREMENT(exp, create);
 
-       rc = OBP(exp->exp_obd, create)(env, exp, obdo, oti);
+       rc = OBP(exp->exp_obd, create)(env, exp, obdo);
        RETURN(rc);
 }
 
 static inline int obd_destroy(const struct lu_env *env, struct obd_export *exp,
-                             struct obdo *obdo, struct obd_trans_info *oti)
+                             struct obdo *obdo)
 {
        int rc;
        ENTRY;
@@ -785,7 +785,7 @@ static inline int obd_destroy(const struct lu_env *env, struct obd_export *exp,
        EXP_CHECK_DT_OP(exp, destroy);
        EXP_COUNTER_INCREMENT(exp, destroy);
 
-       rc = OBP(exp->exp_obd, destroy)(env, exp, obdo, oti);
+       rc = OBP(exp->exp_obd, destroy)(env, exp, obdo);
        RETURN(rc);
 }
 
@@ -803,17 +803,16 @@ static inline int obd_getattr(const struct lu_env *env, struct obd_export *exp,
 }
 
 static inline int obd_setattr(const struct lu_env *env, struct obd_export *exp,
-                              struct obd_info *oinfo,
-                              struct obd_trans_info *oti)
+                             struct obd_info *oinfo)
 {
-        int rc;
-        ENTRY;
+       int rc;
 
-        EXP_CHECK_DT_OP(exp, setattr);
-        EXP_COUNTER_INCREMENT(exp, setattr);
+       ENTRY;
+       EXP_CHECK_DT_OP(exp, setattr);
+       EXP_COUNTER_INCREMENT(exp, setattr);
+       rc = OBP(exp->exp_obd, setattr)(env, exp, oinfo);
 
-        rc = OBP(exp->exp_obd, setattr)(env, exp, oinfo, oti);
-        RETURN(rc);
+       RETURN(rc);
 }
 
 static inline int obd_add_conn(struct obd_import *imp, struct obd_uuid *uuid,
@@ -1165,35 +1164,33 @@ static inline int obd_preprw(const struct lu_env *env, int cmd,
                             struct obd_export *exp, struct obdo *oa,
                             int objcount, struct obd_ioobj *obj,
                             struct niobuf_remote *remote, int *pages,
-                            struct niobuf_local *local,
-                            struct obd_trans_info *oti)
+                            struct niobuf_local *local)
 {
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_DT_OP(exp, preprw);
-        EXP_COUNTER_INCREMENT(exp, preprw);
+       int rc;
 
+       ENTRY;
+       EXP_CHECK_DT_OP(exp, preprw);
+       EXP_COUNTER_INCREMENT(exp, preprw);
        rc = OBP(exp->exp_obd, preprw)(env, cmd, exp, oa, objcount, obj, remote,
-                                      pages, local, oti);
-        RETURN(rc);
+                                      pages, local);
+
+       RETURN(rc);
 }
 
 static inline int obd_commitrw(const struct lu_env *env, int cmd,
-                               struct obd_export *exp, struct obdo *oa,
-                               int objcount, struct obd_ioobj *obj,
-                               struct niobuf_remote *rnb, int pages,
-                               struct niobuf_local *local,
-                               struct obd_trans_info *oti, int rc)
+                              struct obd_export *exp, struct obdo *oa,
+                              int objcount, struct obd_ioobj *obj,
+                              struct niobuf_remote *rnb, int pages,
+                              struct niobuf_local *local, int rc)
 {
-        ENTRY;
+       ENTRY;
 
-        EXP_CHECK_DT_OP(exp, commitrw);
-        EXP_COUNTER_INCREMENT(exp, commitrw);
+       EXP_CHECK_DT_OP(exp, commitrw);
+       EXP_COUNTER_INCREMENT(exp, commitrw);
+       rc = OBP(exp->exp_obd, commitrw)(env, cmd, exp, oa, objcount, obj,
+                                        rnb, pages, local, rc);
 
-        rc = OBP(exp->exp_obd, commitrw)(env, cmd, exp, oa, objcount, obj,
-                                         rnb, pages, local, oti, rc);
-        RETURN(rc);
+       RETURN(rc);
 }
 
 static inline int obd_iocontrol(unsigned int cmd, struct obd_export *exp,
@@ -1645,15 +1642,13 @@ static inline ldlm_mode_t md_lock_match(struct obd_export *exp, __u64 flags,
                                              policy, mode, lockh));
 }
 
-static inline int md_init_ea_size(struct obd_export *exp, int easize,
-                                 int def_asize, int cookiesize,
-                                 int def_cookiesize)
+static inline int md_init_ea_size(struct obd_export *exp, __u32 ea_size,
+                                 __u32 def_ea_size)
 {
        ENTRY;
        EXP_CHECK_MD_OP(exp, init_ea_size);
        EXP_MD_COUNTER_INCREMENT(exp, init_ea_size);
-       RETURN(MDP(exp->exp_obd, init_ea_size)(exp, easize, def_asize,
-                                              cookiesize, def_cookiesize));
+       RETURN(MDP(exp->exp_obd, init_ea_size)(exp, ea_size, def_ea_size));
 }
 
 static inline int md_get_remote_perm(struct obd_export *exp,
index f8e7f26..cf48cf1 100644 (file)
@@ -439,10 +439,9 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg)
                 GOTO(err_import, rc);
         }
 
-        cli->cl_import = imp;
-        /* cli->cl_max_mds_{easize,cookiesize} updated by mdc_init_ea_size() */
-        cli->cl_max_mds_easize = sizeof(struct lov_mds_md_v3);
-        cli->cl_max_mds_cookiesize = sizeof(struct llog_cookie);
+       cli->cl_import = imp;
+       /* cli->cl_max_mds_easize updated by mdc_init_ea_size() */
+       cli->cl_max_mds_easize = sizeof(struct lov_mds_md_v3);
 
         if (LUSTRE_CFG_BUFLEN(lcfg, 3) > 0) {
                 if (!strcmp(lustre_cfg_string(lcfg, 3), "inactive")) {
index 7b24d16..a0b0260 100644 (file)
@@ -52,7 +52,7 @@ static int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp)
 {
        struct lov_stripe_md lsm = { .lsm_magic = LOV_MAGIC_V3 };
        __u32 valsize = sizeof(struct lov_desc);
-       int rc, easize, def_easize, cookiesize;
+       int rc, easize, def_easize;
        struct lov_desc desc;
        __u16 stripes, def_stripes;
        ENTRY;
@@ -71,15 +71,9 @@ static int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp)
        lsm.lsm_stripe_count = def_stripes;
        def_easize = obd_size_diskmd(dt_exp, &lsm);
 
-       cookiesize = stripes * sizeof(struct llog_cookie);
+       CDEBUG(D_HA, "updating def/max_easize: %d/%d\n", def_easize, easize);
 
-       /* default cookiesize is 0 because from 2.4 server doesn't send
-        * llog cookies to client. */
-       CDEBUG(D_HA,
-              "updating def/max_easize: %d/%d def/max_cookiesize: 0/%d\n",
-              def_easize, easize, cookiesize);
-
-       rc = md_init_ea_size(md_exp, easize, def_easize, cookiesize, 0);
+       rc = md_init_ea_size(md_exp, easize, def_easize);
        RETURN(rc);
 }
 
index 2a1a259..910e968 100644 (file)
@@ -908,8 +908,6 @@ int ll_obd_statfs(struct inode *inode, void __user *arg);
 int ll_get_max_mdsize(struct ll_sb_info *sbi, int *max_mdsize);
 int ll_get_default_mdsize(struct ll_sb_info *sbi, int *default_mdsize);
 int ll_set_default_mdsize(struct ll_sb_info *sbi, int default_mdsize);
-int ll_get_max_cookiesize(struct ll_sb_info *sbi, int *max_cookiesize);
-int ll_get_default_cookiesize(struct ll_sb_info *sbi, int *default_cookiesize);
 int ll_process_config(struct lustre_cfg *lcfg);
 
 enum {
index 9e6d912..42a5f6c 100644 (file)
@@ -692,32 +692,6 @@ int ll_set_default_mdsize(struct ll_sb_info *sbi, int lmmsize)
        RETURN(rc);
 }
 
-int ll_get_max_cookiesize(struct ll_sb_info *sbi, int *lmmsize)
-{
-       int size, rc;
-
-       size = sizeof(int);
-       rc = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_MAX_COOKIESIZE),
-                         KEY_MAX_COOKIESIZE, &size, lmmsize);
-       if (rc)
-               CERROR("Get max cookiesize error rc %d\n", rc);
-
-       RETURN(rc);
-}
-
-int ll_get_default_cookiesize(struct ll_sb_info *sbi, int *lmmsize)
-{
-       int size, rc;
-
-       size = sizeof(int);
-       rc = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_DEFAULT_COOKIESIZE),
-                         KEY_DEFAULT_COOKIESIZE, &size, lmmsize);
-       if (rc)
-               CERROR("Get default cookiesize error rc %d\n", rc);
-
-       RETURN(rc);
-}
-
 static void ll_dump_inode(struct inode *inode)
 {
        struct ll_d_hlist_node *tmp;
index c1c7f1a..1e3739b 100644 (file)
@@ -853,36 +853,6 @@ static ssize_t ll_default_easize_seq_write(struct file *file,
 }
 LPROC_SEQ_FOPS(ll_default_easize);
 
-static int ll_max_cookiesize_seq_show(struct seq_file *m, void *v)
-{
-       struct super_block *sb = m->private;
-       struct ll_sb_info *sbi = ll_s2sbi(sb);
-       unsigned int cookielen;
-       int rc;
-
-       rc = ll_get_max_cookiesize(sbi, &cookielen);
-       if (rc)
-               return rc;
-
-       return seq_printf(m, "%u\n", cookielen);
-}
-LPROC_SEQ_FOPS_RO(ll_max_cookiesize);
-
-static int ll_default_cookiesize_seq_show(struct seq_file *m, void *v)
-{
-       struct super_block *sb = m->private;
-       struct ll_sb_info *sbi = ll_s2sbi(sb);
-       unsigned int cookielen;
-       int rc;
-
-       rc = ll_get_default_cookiesize(sbi, &cookielen);
-       if (rc)
-               return rc;
-
-       return seq_printf(m, "%u\n", cookielen);
-}
-LPROC_SEQ_FOPS_RO(ll_default_cookiesize);
-
 static int ll_sbi_flags_seq_show(struct seq_file *m, void *v)
 {
        const char *str[] = LL_SBI_FLAGS;
@@ -1073,10 +1043,6 @@ struct lprocfs_vars lprocfs_llite_obd_vars[] = {
          .fops =       &ll_max_easize_fops                     },
        { .name =       "default_easize",
          .fops =       &ll_default_easize_fops                 },
-       { .name =       "max_cookiesize",
-         .fops =       &ll_max_cookiesize_fops                 },
-       { .name =       "default_cookiesize",
-         .fops =       &ll_default_cookiesize_fops             },
        { .name =       "sbi_flags",
          .fops =       &ll_sbi_flags_fops                      },
        { .name =       "xattr_cache",
index 29550e6..5fe258e 100644 (file)
@@ -265,9 +265,8 @@ static int lmv_connect(const struct lu_env *env,
        RETURN(rc);
 }
 
-static int lmv_init_ea_size(struct obd_export *exp,
-                           __u32 easize, __u32 def_easize,
-                           __u32 cookiesize, __u32 def_cookiesize)
+static int lmv_init_ea_size(struct obd_export *exp, __u32 easize,
+                           __u32 def_easize)
 {
        struct obd_device       *obd = exp->exp_obd;
        struct lmv_obd          *lmv = &obd->u.lmv;
@@ -284,14 +283,7 @@ static int lmv_init_ea_size(struct obd_export *exp,
                 lmv->max_def_easize = def_easize;
                 change = 1;
         }
-        if (lmv->max_cookiesize < cookiesize) {
-                lmv->max_cookiesize = cookiesize;
-                change = 1;
-        }
-       if (lmv->max_def_cookiesize < def_cookiesize) {
-               lmv->max_def_cookiesize = def_cookiesize;
-               change = 1;
-       }
+
        if (change == 0)
                RETURN(0);
 
@@ -306,8 +298,7 @@ static int lmv_init_ea_size(struct obd_export *exp,
                        continue;
                }
 
-               rc = md_init_ea_size(tgt->ltd_exp, easize, def_easize,
-                                    cookiesize, def_cookiesize);
+               rc = md_init_ea_size(tgt->ltd_exp, easize, def_easize);
                if (rc) {
                        CERROR("%s: obd_init_ea_size() failed on MDT target %d:"
                               " rc = %d\n", obd->obd_name, i, rc);
@@ -392,8 +383,7 @@ int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
        tgt->ltd_exp = mdc_exp;
        lmv->desc.ld_active_tgt_count++;
 
-       md_init_ea_size(tgt->ltd_exp, lmv->max_easize, lmv->max_def_easize,
-                       lmv->max_cookiesize, lmv->max_def_cookiesize);
+       md_init_ea_size(tgt->ltd_exp, lmv->max_easize, lmv->max_def_easize);
 
        CDEBUG(D_CONFIG, "Connected to %s(%s) successfully (%d)\n",
                mdc_obd->obd_name, mdc_obd->obd_uuid.uuid,
@@ -522,7 +512,7 @@ static int lmv_add_target(struct obd_device *obd, struct obd_uuid *uuidp,
                } else {
                        int easize = sizeof(struct lmv_stripe_md) +
                                lmv->desc.ld_tgt_count * sizeof(struct lu_fid);
-                       lmv_init_ea_size(obd->obd_self_export, easize, 0, 0, 0);
+                       lmv_init_ea_size(obd->obd_self_export, easize, 0);
                }
        }
 
@@ -578,7 +568,7 @@ int lmv_check_connect(struct obd_device *obd)
        class_export_put(lmv->exp);
        lmv->connected = 1;
        easize = lmv_mds_md_size(lmv->desc.ld_tgt_count, LMV_MAGIC);
-       lmv_init_ea_size(obd->obd_self_export, easize, 0, 0, 0);
+       lmv_init_ea_size(obd->obd_self_export, easize, 0);
        mutex_unlock(&lmv->lmv_init_mutex);
        RETURN(0);
 
@@ -1373,7 +1363,6 @@ static int lmv_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
        obd_str2uuid(&lmv->desc.ld_uuid, desc->ld_uuid.uuid);
        lmv->desc.ld_tgt_count = 0;
        lmv->desc.ld_active_tgt_count = 0;
-       lmv->max_cookiesize = 0;
        lmv->max_def_easize = 0;
        lmv->max_easize = 0;
        lmv->lmv_placement = PLACEMENT_CHAR_POLICY;
@@ -2799,8 +2788,6 @@ static int lmv_get_info(const struct lu_env *env, struct obd_export *exp,
                RETURN(-EINVAL);
        } else if (KEY_IS(KEY_MAX_EASIZE) ||
                   KEY_IS(KEY_DEFAULT_EASIZE) ||
-                  KEY_IS(KEY_MAX_COOKIESIZE) ||
-                  KEY_IS(KEY_DEFAULT_COOKIESIZE) ||
                   KEY_IS(KEY_CONN_DATA)) {
                rc = lmv_check_connect(obd);
                if (rc)
index 16c7708..77ce075 100644 (file)
@@ -415,7 +415,6 @@ struct lov_io_sub {
         int                  sub_refcheck;
         int                  sub_refcheck2;
         int                  sub_reenter;
-        void                *sub_cookie;
 };
 
 /**
index e5c4618..525ff2f 100644 (file)
@@ -107,7 +107,6 @@ struct lov_request_set {
        atomic_t                 set_completes;
        atomic_t                 set_success;
        atomic_t                 set_finish_checked;
-       struct llog_cookie      *set_cookies;
        struct list_head         set_list;
        wait_queue_head_t        set_waitq;
 };
index 044be45..8774fc8 100644 (file)
@@ -49,7 +49,6 @@ static void lov_init_set(struct lov_request_set *set)
        atomic_set(&set->set_completes, 0);
        atomic_set(&set->set_success, 0);
        atomic_set(&set->set_finish_checked, 0);
-       set->set_cookies = NULL;
        INIT_LIST_HEAD(&set->set_list);
        atomic_set(&set->set_refcount, 1);
        init_waitqueue_head(&set->set_waitq);
index 709d7cf..40f41ca 100644 (file)
@@ -436,8 +436,6 @@ static struct ptlrpc_request *mdc_intent_unlink_pack(struct obd_export *exp,
 
        req_capsule_set_size(&req->rq_pill, &RMF_MDT_MD, RCL_SERVER,
                             obddev->u.cli.cl_default_mds_easize);
-       req_capsule_set_size(&req->rq_pill, &RMF_ACL, RCL_SERVER,
-                            obddev->u.cli.cl_default_mds_cookiesize);
        ptlrpc_request_set_replen(req);
        RETURN(req);
 }
index 375d0c8..55ec685 100644 (file)
@@ -310,8 +310,6 @@ int mdc_unlink(struct obd_export *exp, struct md_op_data *op_data,
 
        req_capsule_set_size(&req->rq_pill, &RMF_MDT_MD, RCL_SERVER,
                             obd->u.cli.cl_default_mds_easize);
-       req_capsule_set_size(&req->rq_pill, &RMF_LOGCOOKIES, RCL_SERVER,
-                            obd->u.cli.cl_default_mds_cookiesize);
        ptlrpc_request_set_replen(req);
 
         *request = req;
@@ -425,8 +423,6 @@ int mdc_rename(struct obd_export *exp, struct md_op_data *op_data,
 
        req_capsule_set_size(&req->rq_pill, &RMF_MDT_MD, RCL_SERVER,
                             obd->u.cli.cl_default_mds_easize);
-       req_capsule_set_size(&req->rq_pill, &RMF_LOGCOOKIES, RCL_SERVER,
-                            obd->u.cli.cl_default_mds_cookiesize);
        ptlrpc_request_set_replen(req);
 
         rc = mdc_reint(req, obd->u.cli.cl_rpc_lock, LUSTRE_IMP_FULL);
index 808abbe..05f6b7e 100644 (file)
@@ -888,8 +888,6 @@ static int mdc_close(struct obd_export *exp, struct md_op_data *op_data,
 
        req_capsule_set_size(&req->rq_pill, &RMF_MDT_MD, RCL_SERVER,
                             obd->u.cli.cl_default_mds_easize);
-       req_capsule_set_size(&req->rq_pill, &RMF_LOGCOOKIES, RCL_SERVER,
-                            obd->u.cli.cl_default_mds_cookiesize);
 
         ptlrpc_request_set_replen(req);
 
@@ -2533,23 +2531,6 @@ static int mdc_get_info(const struct lu_env *env, struct obd_export *exp,
                default_easize = val;
                *default_easize = exp->exp_obd->u.cli.cl_default_mds_easize;
                RETURN(0);
-       } else if (KEY_IS(KEY_MAX_COOKIESIZE)) {
-               __u32 *max_cookiesize;
-
-               if (*vallen != sizeof(int))
-                       RETURN(-EINVAL);
-               max_cookiesize = val;
-               *max_cookiesize = exp->exp_obd->u.cli.cl_max_mds_cookiesize;
-               RETURN(0);
-       } else if (KEY_IS(KEY_DEFAULT_COOKIESIZE)) {
-               __u32 *default_cookiesize;
-
-               if (*vallen != sizeof(int))
-                       RETURN(-EINVAL);
-               default_cookiesize = val;
-               *default_cookiesize =
-                       exp->exp_obd->u.cli.cl_default_mds_cookiesize;
-               RETURN(0);
         } else if (KEY_IS(KEY_CONN_DATA)) {
                 struct obd_import *imp = class_exp2cliimp(exp);
                 struct obd_connect_data *data = val;
@@ -2785,17 +2766,16 @@ err_rpc_lock:
         RETURN(rc);
 }
 
-/* Initialize the default and maximum LOV EA and cookie sizes.  This allows
+/* Initialize the default and maximum LOV EA sizes.  This allows
  * us to make MDS RPCs with large enough reply buffers to hold a default
- * sized EA and cookie without having to calculate this (via a call into the
+ * sized EA without having to calculate this (via a call into the
  * LOV + OSCs) each time we make an RPC.  The maximum size is also tracked
  * but not used to avoid wastefully vmalloc()'ing large reply buffers when
  * a large number of stripes is possible.  If a larger reply buffer is
  * required it will be reallocated in the ptlrpc layer due to overflow.
  */
 static int mdc_init_ea_size(struct obd_export *exp, __u32 easize,
-                           __u32 def_easize, __u32 cookiesize,
-                           __u32 def_cookiesize)
+                           __u32 def_easize)
 {
        struct obd_device *obd = exp->exp_obd;
        struct client_obd *cli = &obd->u.cli;
@@ -2807,12 +2787,6 @@ static int mdc_init_ea_size(struct obd_export *exp, __u32 easize,
        if (cli->cl_default_mds_easize < def_easize)
                cli->cl_default_mds_easize = def_easize;
 
-       if (cli->cl_max_mds_cookiesize < cookiesize)
-               cli->cl_max_mds_cookiesize = cookiesize;
-
-       if (cli->cl_default_mds_cookiesize < def_cookiesize)
-               cli->cl_default_mds_cookiesize = def_cookiesize;
-
        RETURN(0);
 }
 
index 9b03bd8..81d106a 100644 (file)
@@ -1000,12 +1000,10 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
         }
 
        if (reqbody->mbo_valid & OBD_MD_FLMODEASIZE) {
-               repbody->mbo_max_cookiesize = 0;
                repbody->mbo_max_mdsize = info->mti_mdt->mdt_max_mdsize;
                repbody->mbo_valid |= OBD_MD_FLMODEASIZE;
-               CDEBUG(D_INODE, "I am going to change the MAX_MD_SIZE & "
-                      "MAX_COOKIE to : %d:%d\n", repbody->mbo_max_mdsize,
-                      repbody->mbo_max_cookiesize);
+               CDEBUG(D_INODE, "changing the max MD size to %u\n",
+                      repbody->mbo_max_mdsize);
        }
 
        if (exp_connect_rmtclient(info->mti_exp) &&
index bdda659..ae97398 100644 (file)
@@ -1853,7 +1853,7 @@ int mdt_close(struct tgt_session_info *tsi)
                 ma->ma_lmm_size = req_capsule_get_size(info->mti_pill,
                                                        &RMF_MDT_MD,
                                                        RCL_SERVER);
-                ma->ma_need = MA_INODE | MA_LOV | MA_COOKIE;
+               ma->ma_need = MA_INODE | MA_LOV;
                repbody->mbo_eadatasize = 0;
                repbody->mbo_aclsize = 0;
         } else {
index 33bbc40..45cb2f4 100644 (file)
@@ -153,8 +153,6 @@ void obdo_cpy_md(struct obdo *dst, const struct obdo *src, u64 valid)
                 dst->o_parent_oid = src->o_parent_oid;
         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 a7cea4b..ac0a9eb 100644 (file)
@@ -116,7 +116,7 @@ static u64 echo_next_id(struct obd_device *obddev)
 }
 
 static int echo_create(const struct lu_env *env, struct obd_export *exp,
-                      struct obdo *oa, struct obd_trans_info *oti)
+                      struct obdo *oa)
 {
         struct obd_device *obd = class_exp2obd(exp);
 
@@ -144,7 +144,7 @@ static int echo_create(const struct lu_env *env, struct obd_export *exp,
 }
 
 static int echo_destroy(const struct lu_env *env, struct obd_export *exp,
-                       struct obdo *oa, struct obd_trans_info *oti)
+                       struct obdo *oa)
 {
         struct obd_device *obd = class_exp2obd(exp);
 
@@ -196,7 +196,7 @@ static int echo_getattr(const struct lu_env *env, struct obd_export *exp,
 }
 
 static int echo_setattr(const struct lu_env *env, struct obd_export *exp,
-                        struct obd_info *oinfo, struct obd_trans_info *oti)
+                       struct obd_info *oinfo)
 {
         struct obd_device *obd = class_exp2obd(exp);
 
@@ -215,14 +215,7 @@ static int echo_setattr(const struct lu_env *env, struct obd_export *exp,
 
         memcpy(&obd->u.echo.eo_oa, oinfo->oi_oa, sizeof(*oinfo->oi_oa));
 
-        if (ostid_id(&oinfo->oi_oa->o_oi) & 4) {
-                /* Save lock to force ACKed reply */
-                ldlm_lock_addref (&obd->u.echo.eo_nl_lock, LCK_NL);
-                oti->oti_ack_locks[0].mode = LCK_NL;
-                oti->oti_ack_locks[0].lock = obd->u.echo.eo_nl_lock;
-        }
-
-        RETURN(0);
+       RETURN(0);
 }
 
 static void
@@ -281,9 +274,6 @@ echo_page_debug_check(struct page *page, u64 id,
        return rc;
 }
 
-/* This allows us to verify that desc_private is passed unmolested */
-#define DESC_PRIV 0x10293847
-
 static int echo_map_nb_to_lb(struct obdo *oa, struct obd_ioobj *obj,
                              struct niobuf_remote *nb, int *pages,
                              struct niobuf_local *lb, int cmd, int *left)
@@ -402,7 +392,7 @@ static int echo_preprw(const struct lu_env *env, int cmd,
                       struct obd_export *export, struct obdo *oa,
                       int objcount, struct obd_ioobj *obj,
                       struct niobuf_remote *nb, int *pages,
-                      struct niobuf_local *res, struct obd_trans_info *oti)
+                      struct niobuf_local *res)
 {
         struct obd_device *obd;
         int tot_bytes = 0;
@@ -422,9 +412,6 @@ static int echo_preprw(const struct lu_env *env, int cmd,
         CDEBUG(D_PAGE, "%s %d obdos with %d IOs\n",
                cmd == OBD_BRW_READ ? "reading" : "writing", objcount, *pages);
 
-        if (oti)
-                oti->oti_handle = (void *)DESC_PRIV;
-
         left = *pages;
         *pages = 0;
 
@@ -479,8 +466,7 @@ static int echo_commitrw(const struct lu_env *env, int cmd,
                         struct obd_export *export, struct obdo *oa,
                         int objcount, struct obd_ioobj *obj,
                         struct niobuf_remote *rb, int niocount,
-                        struct niobuf_local *res, struct obd_trans_info *oti,
-                        int rc)
+                        struct niobuf_local *res, int rc)
 {
         struct obd_device *obd;
         int pgs = 0;
@@ -507,8 +493,6 @@ static int echo_commitrw(const struct lu_env *env, int cmd,
                 RETURN(-EINVAL);
         }
 
-        LASSERT(oti == NULL || oti->oti_handle == (void *)DESC_PRIV);
-
        for (i = 0; i < objcount; i++, obj++) {
                int verify = (rc == 0 &&
                             ostid_id(&obj->ioo_oid) != ECHO_PERSISTENT_OBJID &&
index 944dddd..ef50745 100644 (file)
@@ -2175,7 +2175,7 @@ out_env:
 #endif /* HAVE_SERVER_SUPPORT */
 
 static int echo_create_object(const struct lu_env *env, struct echo_device *ed,
-                             struct obdo *oa, struct obd_trans_info *oti)
+                             struct obdo *oa)
 {
        struct echo_object      *eco;
        struct echo_client_obd  *ec = ed->ed_ec;
@@ -2193,7 +2193,7 @@ static int echo_create_object(const struct lu_env *env, struct echo_device *ed,
        if (ostid_id(&oa->o_oi) == 0)
                ostid_set_id(&oa->o_oi, ++last_object_id);
 
-       rc = obd_create(env, ec->ec_exp, oa, oti);
+       rc = obd_create(env, ec->ec_exp, oa);
        if (rc != 0) {
                CERROR("Cannot create objects: rc = %d\n", rc);
                GOTO(failed, rc);
@@ -2213,7 +2213,7 @@ static int echo_create_object(const struct lu_env *env, struct echo_device *ed,
 
 failed:
        if (created && rc != 0)
-               obd_destroy(env, ec->ec_exp, oa, oti);
+               obd_destroy(env, ec->ec_exp, oa);
 
        if (rc != 0)
                CERROR("create object failed with: rc = %d\n", rc);
@@ -2317,8 +2317,7 @@ echo_client_page_debug_check(struct page *page, u64 id, u64 offset, u64 count)
 
 static int echo_client_kbrw(struct echo_device *ed, int rw, struct obdo *oa,
                            struct echo_object *eco, u64 offset,
-                           u64 count, int async,
-                           struct obd_trans_info *oti)
+                           u64 count, int async)
 {
        size_t                  npages;
         struct brw_page        *pga;
@@ -2412,8 +2411,7 @@ static int echo_client_prep_commit(const struct lu_env *env,
                                   struct obd_export *exp, int rw,
                                   struct obdo *oa, struct echo_object *eco,
                                   u64 offset, u64 count,
-                                  u64 batch, struct obd_trans_info *oti,
-                                  int async)
+                                  u64 batch, int async)
 {
        struct obd_ioobj         ioo;
        struct niobuf_local     *lnb;
@@ -2458,8 +2456,7 @@ static int echo_client_prep_commit(const struct lu_env *env,
                 ioo.ioo_bufcnt = npages;
 
                 lpages = npages;
-               ret = obd_preprw(env, rw, exp, oa, 1, &ioo, rnb, &lpages,
-                                lnb, oti);
+               ret = obd_preprw(env, rw, exp, oa, 1, &ioo, rnb, &lpages, lnb);
                 if (ret != 0)
                         GOTO(out, ret);
                 LASSERT(lpages == npages);
@@ -2491,14 +2488,11 @@ static int echo_client_prep_commit(const struct lu_env *env,
                                                             rnb[i].rnb_len);
                }
 
-               ret = obd_commitrw(env, rw, exp, oa, 1, &ioo,
-                                  rnb, npages, lnb, oti, ret);
+               ret = obd_commitrw(env, rw, exp, oa, 1, &ioo, rnb, npages, lnb,
+                                  ret);
                 if (ret != 0)
                         GOTO(out, ret);
 
-                /* Reset oti otherwise it would confuse ldiskfs. */
-                memset(oti, 0, sizeof(*oti));
-
                /* Reuse env context. */
                lu_context_exit((struct lu_context *)&env->le_ctx);
                lu_context_enter((struct lu_context *)&env->le_ctx);
@@ -2514,8 +2508,7 @@ out:
 
 static int echo_client_brw_ioctl(const struct lu_env *env, int rw,
                                 struct obd_export *exp,
-                                struct obd_ioctl_data *data,
-                                struct obd_trans_info *dummy_oti)
+                                struct obd_ioctl_data *data)
 {
         struct obd_device *obd = class_exp2obd(exp);
         struct echo_device *ed = obd2echo_dev(obd);
@@ -2553,21 +2546,21 @@ static int echo_client_brw_ioctl(const struct lu_env *env, int rw,
         case 1:
                 /* fall through */
         case 2:
-                rc = echo_client_kbrw(ed, rw, oa,
-                                      eco, data->ioc_offset,
-                                     data->ioc_count, async, dummy_oti);
-                break;
-        case 3:
-               rc = echo_client_prep_commit(env, ec->ec_exp, rw, oa,
-                                            eco, data->ioc_offset,
-                                            data->ioc_count, data->ioc_plen1,
-                                            dummy_oti, async);
-                break;
-        default:
-                rc = -EINVAL;
-        }
-        echo_put_object(eco);
-        RETURN(rc);
+               rc = echo_client_kbrw(ed, rw, oa, eco, data->ioc_offset,
+                                     data->ioc_count, async);
+               break;
+       case 3:
+               rc = echo_client_prep_commit(env, ec->ec_exp, rw, oa, eco,
+                                            data->ioc_offset, data->ioc_count,
+                                            data->ioc_plen1, async);
+               break;
+       default:
+               rc = -EINVAL;
+       }
+
+       echo_put_object(eco);
+
+       RETURN(rc);
 }
 
 static int
@@ -2582,21 +2575,16 @@ echo_client_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
         struct echo_client_obd *ec = ed->ed_ec;
         struct echo_object     *eco;
         struct obd_ioctl_data  *data = karg;
-        struct obd_trans_info   dummy_oti;
         struct lu_env          *env;
-        struct oti_req_ack_lock *ack_lock;
         struct obdo            *oa;
         struct lu_fid           fid;
         int                     rw = OBD_BRW_READ;
         int                     rc = 0;
-        int                     i;
 #ifdef HAVE_SERVER_SUPPORT
        struct lu_context        echo_session;
 #endif
         ENTRY;
 
-        memset(&dummy_oti, 0, sizeof(dummy_oti));
-
        oa = &data->ioc_obdo1;
        if (!(oa->o_valid & OBD_MD_FLGROUP)) {
                oa->o_valid |= OBD_MD_FLGROUP;
@@ -2632,7 +2620,7 @@ echo_client_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
                 if (!cfs_capable(CFS_CAP_SYS_ADMIN))
                         GOTO (out, rc = -EPERM);
 
-               rc = echo_create_object(env, ed, oa, &dummy_oti);
+               rc = echo_create_object(env, ed, oa);
                 GOTO(out, rc);
 
 #ifdef HAVE_SERVER_SUPPORT
@@ -2708,7 +2696,7 @@ echo_client_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 
                 rc = echo_get_object(&eco, ed, oa);
                 if (rc == 0) {
-                       rc = obd_destroy(env, ec->ec_exp, oa, &dummy_oti);
+                       rc = obd_destroy(env, ec->ec_exp, oa);
                         if (rc == 0)
                                 eco->eo_deleted = 1;
                         echo_put_object(eco);
@@ -2737,7 +2725,7 @@ echo_client_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
                                .oi_oa = oa,
                        };
 
-                        rc = obd_setattr(env, ec->ec_exp, &oinfo, NULL);
+                       rc = obd_setattr(env, ec->ec_exp, &oinfo);
                         echo_put_object(eco);
                 }
                 GOTO(out, rc);
@@ -2749,7 +2737,7 @@ echo_client_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
                 rw = OBD_BRW_WRITE;
                 /* fall through */
         case OBD_IOC_BRW_READ:
-               rc = echo_client_brw_ioctl(env, rw, exp, data, &dummy_oti);
+               rc = echo_client_brw_ioctl(env, rw, exp, data);
                 GOTO(out, rc);
 
         default:
@@ -2768,14 +2756,6 @@ out_env:
 out_alloc:
         OBD_FREE_PTR(env);
 
-        /* XXX this should be in a helper also called by target_send_reply */
-        for (ack_lock = dummy_oti.oti_ack_locks, i = 0; i < 4;
-             i++, ack_lock++) {
-                if (!ack_lock->mode)
-                        break;
-                ldlm_lock_decref(&ack_lock->lock, ack_lock->mode);
-        }
-
         return rc;
 }
 
index 02c71b6..0684506 100644 (file)
@@ -368,12 +368,11 @@ int ofd_verify_ff(const struct lu_env *env, struct ofd_object *fo,
 int ofd_preprw(const struct lu_env *env,int cmd, struct obd_export *exp,
               struct obdo *oa, int objcount, struct obd_ioobj *obj,
               struct niobuf_remote *rnb, int *nr_local,
-              struct niobuf_local *lnb, struct obd_trans_info *oti);
+              struct niobuf_local *lnb);
 int ofd_commitrw(const struct lu_env *env, int cmd, struct obd_export *exp,
                 struct obdo *oa, int objcount, struct obd_ioobj *obj,
                 struct niobuf_remote *rnb, int npages,
-                struct niobuf_local *lnb, struct obd_trans_info *oti,
-                int old_rc);
+                struct niobuf_local *lnb, int old_rc);
 
 /* ofd_trans.c */
 struct thandle *ofd_trans_create(const struct lu_env *env,
@@ -563,20 +562,6 @@ static inline struct ofd_thread_info *tsi2ofd_info(struct tgt_session_info *tsi)
        return info;
 }
 
-static inline void ofd_oti2info(struct ofd_thread_info *info,
-                               struct obd_trans_info *oti)
-{
-       info->fti_xid = oti->oti_xid;
-       info->fti_pre_version = oti->oti_pre_version;
-}
-
-static inline void ofd_info2oti(struct ofd_thread_info *info,
-                                struct obd_trans_info *oti)
-{
-       oti->oti_xid = info->fti_xid;
-       oti->oti_pre_version = info->fti_pre_version;
-}
-
 /* sync on lock cancel is useless when we force a journal flush,
  * and if we enable async journal commit, we should also turn on
  * sync on lock cancel if it is not enabled already. */
index 14f8e13..3352616 100644 (file)
@@ -676,7 +676,6 @@ out:
  * \param[in] rnb      remote buffers
  * \param[in] nr_local number of local buffers
  * \param[in] lnb      local buffers
- * \param[in] oti      request data from OST
  *
  * \retval             0 on successful prepare
  * \retval             negative value on error
@@ -684,7 +683,7 @@ out:
 int ofd_preprw(const struct lu_env *env, int cmd, struct obd_export *exp,
               struct obdo *oa, int objcount, struct obd_ioobj *obj,
               struct niobuf_remote *rnb, int *nr_local,
-              struct niobuf_local *lnb, struct obd_trans_info *oti)
+              struct niobuf_local *lnb)
 {
        struct tgt_session_info *tsi = tgt_ses_info(env);
        struct ofd_device       *ofd = ofd_exp(exp);
@@ -701,9 +700,7 @@ int ofd_preprw(const struct lu_env *env, int cmd, struct obd_export *exp,
        }
 
        if (tgt_ses_req(tsi) == NULL) { /* echo client case */
-               LASSERT(oti != NULL);
                info = ofd_info_init(env, exp);
-               ofd_oti2info(info, oti);
                jobid = NULL;
        } else {
                info = tsi2ofd_info(tsi);
@@ -1149,7 +1146,6 @@ out:
  * \param[in] rnb      remote buffers
  * \param[in] npages   number of local buffers
  * \param[in] lnb      local buffers
- * \param[in] oti      request data from OST
  * \param[in] old_rc   result of processing at this point
  *
  * \retval             0 on successful commit
@@ -1158,8 +1154,7 @@ out:
 int ofd_commitrw(const struct lu_env *env, int cmd, struct obd_export *exp,
                 struct obdo *oa, int objcount, struct obd_ioobj *obj,
                 struct niobuf_remote *rnb, int npages,
-                struct niobuf_local *lnb, struct obd_trans_info *oti,
-                int old_rc)
+                struct niobuf_local *lnb, int old_rc)
 {
        struct ofd_thread_info  *info = ofd_info(env);
        struct ofd_mod_data     *fmd;
@@ -1247,7 +1242,5 @@ int ofd_commitrw(const struct lu_env *env, int cmd, struct obd_export *exp,
                rc = -EPROTO;
        }
 
-       if (oti != NULL)
-               ofd_info2oti(info, oti);
        RETURN(rc);
 }
index 2d98434..6de500c 100644 (file)
@@ -878,13 +878,12 @@ out:
  * \param[in] env      execution environment
  * \param[in] exp      OBD export of OFD device
  * \param[in] oinfo    obd_info with setattr parameters
- * \param[in] oti      not used in OFD
  *
  * \retval             0 if successful
  * \retval             negative value on error
  */
 static int ofd_echo_setattr(const struct lu_env *env, struct obd_export *exp,
-                           struct obd_info *oinfo, struct obd_trans_info *oti)
+                           struct obd_info *oinfo)
 {
        struct ofd_thread_info  *info;
        struct ofd_device       *ofd = ofd_exp(exp);
@@ -1025,7 +1024,6 @@ int ofd_destroy_by_fid(const struct lu_env *env, struct ofd_device *ofd,
  * \param[in] env      execution environment
  * \param[in] exp      OBD export of OFD device
  * \param[in] oa       obdo structure with FID
- * \param[in] oti      not used in OFD
  *
  * Note: this is OBD API method which is common API for server OBDs and
  * client OBDs. Thus some parameters used in client OBDs may not be used
@@ -1035,7 +1033,7 @@ int ofd_destroy_by_fid(const struct lu_env *env, struct ofd_device *ofd,
  * \retval             negative value on error
  */
 static int ofd_echo_destroy(const struct lu_env *env, struct obd_export *exp,
-                           struct obdo *oa, struct obd_trans_info *oti)
+                           struct obdo *oa)
 {
        struct ofd_device       *ofd = ofd_exp(exp);
        struct lu_fid           *fid = &oa->o_oi.oi_fid;
@@ -1072,8 +1070,6 @@ out:
  * \param[in]  env     execution environment
  * \param[in]  exp     OBD export of OFD device
  * \param[in]  oa      obdo structure with FID sequence to use
- * \param[out] ea      contains object ID/SEQ to return
- * \param[in]  oti     not used in OFD
  *
  * Note: this is OBD API method which is common API for server OBDs and
  * client OBDs. Thus some parameters used in client OBDs may not be used
@@ -1083,7 +1079,7 @@ out:
  * \retval             negative value on error
  */
 static int ofd_echo_create(const struct lu_env *env, struct obd_export *exp,
-                          struct obdo *oa, struct obd_trans_info *oti)
+                          struct obdo *oa)
 {
        struct ofd_device       *ofd = ofd_exp(exp);
        struct ofd_thread_info  *info;
index 9b321b4..58647e7 100644 (file)
@@ -209,7 +209,7 @@ static int osc_getattr(const struct lu_env *env, struct obd_export *exp,
 }
 
 static int osc_setattr(const struct lu_env *env, struct obd_export *exp,
-                       struct obd_info *oinfo, struct obd_trans_info *oti)
+                      struct obd_info *oinfo)
 {
         struct ptlrpc_request *req;
         struct ost_body       *body;
@@ -319,7 +319,7 @@ int osc_setattr_async(struct obd_export *exp, struct obd_info *oinfo,
 }
 
 static int osc_create(const struct lu_env *env, struct obd_export *exp,
-                     struct obdo *oa, struct obd_trans_info *oti)
+                     struct obdo *oa)
 {
         struct ptlrpc_request *req;
         struct ost_body       *body;
@@ -347,14 +347,6 @@ static int osc_create(const struct lu_env *env, struct obd_export *exp,
 
         ptlrpc_request_set_replen(req);
 
-        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 */
-                req->rq_no_resend = req->rq_no_delay = 1;
-        }
-
         rc = ptlrpc_queue_wait(req);
         if (rc)
                 GOTO(out_req, rc);
@@ -369,19 +361,10 @@ static int osc_create(const struct lu_env *env, struct obd_export *exp,
        oa->o_blksize = cli_brw_size(exp->exp_obd);
        oa->o_valid |= OBD_MD_FLBLKSZ;
 
-        if (oti != NULL) {
-                if (oa->o_valid & OBD_MD_FLCOOKIE) {
-                       if (oti->oti_logcookies == NULL)
-                               oti->oti_logcookies = &oti->oti_onecookie;
-
-                        *oti->oti_logcookies = oa->o_lcookie;
-                }
-        }
-
-        CDEBUG(D_HA, "transno: "LPD64"\n",
-               lustre_msg_get_transno(req->rq_repmsg));
+       CDEBUG(D_HA, "transno: "LPD64"\n",
+              lustre_msg_get_transno(req->rq_repmsg));
 out_req:
-        ptlrpc_req_finished(req);
+       ptlrpc_req_finished(req);
 out:
        RETURN(rc);
 }
@@ -563,18 +546,8 @@ static int osc_can_send_destroy(struct client_obd *cli)
        return 0;
 }
 
-/* Destroy requests can be async always on the client, and we don't even really
- * care about the return code since the client cannot do anything at all about
- * a destroy failure.
- * When the MDS is unlinking a filename, it saves the file objects into a
- * recovery llog, and these object records are cancelled when the OST reports
- * they were destroyed and sync'd to disk (i.e. transaction committed).
- * If the client dies, or the OST is down when the object should be destroyed,
- * the records are not cancelled, and when the OST reconnects to the MDS next,
- * it will retrieve the llog unlink logs and then sends the log cancellation
- * cookies to the MDS after committing destroy transactions. */
 static int osc_destroy(const struct lu_env *env, struct obd_export *exp,
-                      struct obdo *oa, struct obd_trans_info *oti)
+                      struct obdo *oa)
 {
         struct client_obd     *cli = &exp->exp_obd->u.cli;
         struct ptlrpc_request *req;
@@ -608,32 +581,23 @@ static int osc_destroy(const struct lu_env *env, struct obd_export *exp,
         req->rq_request_portal = OST_IO_PORTAL; /* bug 7198 */
         ptlrpc_at_set_req_timeout(req);
 
-       if (oti != NULL && oa->o_valid & OBD_MD_FLCOOKIE)
-               oa->o_lcookie = *oti->oti_logcookies;
        body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
        LASSERT(body);
        lustre_set_wire_obdo(&req->rq_import->imp_connect_data, &body->oa, oa);
 
         ptlrpc_request_set_replen(req);
 
-       /* If osc_destory is for destroying the unlink orphan,
-        * sent from MDT to OST, which should not be blocked here,
-        * because the process might be triggered by ptlrpcd, and
-        * it is not good to block ptlrpcd thread (b=16006)*/
-       if (!(oa->o_flags & OBD_FL_DELORPHAN)) {
-                req->rq_interpret_reply = osc_destroy_interpret;
-                if (!osc_can_send_destroy(cli)) {
-                        struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP,
-                                                          NULL);
-
-                        /*
-                         * Wait until the number of on-going destroy RPCs drops
-                         * under max_rpc_in_flight
-                         */
-                        l_wait_event_exclusive(cli->cl_destroy_waitq,
-                                               osc_can_send_destroy(cli), &lwi);
-                }
-        }
+       req->rq_interpret_reply = osc_destroy_interpret;
+       if (!osc_can_send_destroy(cli)) {
+               struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL);
+
+               /*
+                * Wait until the number of on-going destroy RPCs drops
+                * under max_rpc_in_flight
+                */
+               l_wait_event_exclusive(cli->cl_destroy_waitq,
+                                      osc_can_send_destroy(cli), &lwi);
+       }
 
         /* Do not wait for response */
         ptlrpcd_add_req(req, PDL_POLICY_ROUND, -1);
index dcacf85..aa71b03 100644 (file)
@@ -1835,7 +1835,7 @@ void lustre_swab_mdt_body (struct mdt_body *b)
        __swab32s(&b->mbo_eadatasize);
        __swab32s(&b->mbo_aclsize);
        __swab32s(&b->mbo_max_mdsize);
-       __swab32s(&b->mbo_max_cookiesize);
+       CLASSERT(offsetof(typeof(*b), mbo_unused3) != 0);
        __swab32s(&b->mbo_uid_h);
        __swab32s(&b->mbo_gid_h);
        CLASSERT(offsetof(typeof(*b), mbo_padding_5) != 0);
@@ -2327,9 +2327,6 @@ void dump_obdo(struct obdo *oa)
         if (valid & OBD_MD_FLHANDLE)
                 CDEBUG(D_RPCTRACE, "obdo: o_handle = "LPD64"\n",
                        oa->o_handle.cookie);
-        if (valid & OBD_MD_FLCOOKIE)
-                CDEBUG(D_RPCTRACE, "obdo: o_lcookie = "
-                       "(llog_cookie dumping not yet implemented)\n");
 }
 
 void dump_ost_body(struct ost_body *ob)
index c96bc9d..ad250cb 100644 (file)
@@ -1315,8 +1315,6 @@ void lustre_assert_wire_constants(void)
                 OBD_MD_FLCKSUM);
        LASSERTF(OBD_MD_FLQOS == (0x00200000ULL), "found 0x%.16llxULL\n",
                 OBD_MD_FLQOS);
-       LASSERTF(OBD_MD_FLCOOKIE == (0x00800000ULL), "found 0x%.16llxULL\n",
-                OBD_MD_FLCOOKIE);
        LASSERTF(OBD_MD_FLGROUP == (0x01000000ULL), "found 0x%.16llxULL\n",
                 OBD_MD_FLGROUP);
        LASSERTF(OBD_MD_FLFID == (0x02000000ULL), "found 0x%.16llxULL\n",
@@ -2043,10 +2041,10 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct mdt_body, mbo_max_mdsize));
        LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_max_mdsize) == 4, "found %lld\n",
                 (long long)(int)sizeof(((struct mdt_body *)0)->mbo_max_mdsize));
-       LASSERTF((int)offsetof(struct mdt_body, mbo_max_cookiesize) == 160, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, mbo_max_cookiesize));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_max_cookiesize) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_max_cookiesize));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_unused3) == 160, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_unused3));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_unused3) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_unused3));
        LASSERTF((int)offsetof(struct mdt_body, mbo_uid_h) == 164, "found %lld\n",
                 (long long)(int)offsetof(struct mdt_body, mbo_uid_h));
        LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_uid_h) == 4, "found %lld\n",
index 4f552b7..c06bb18 100644 (file)
@@ -1750,7 +1750,7 @@ int tgt_brw_read(struct tgt_session_info *tsi)
 
        npages = PTLRPC_MAX_BRW_PAGES;
        rc = obd_preprw(tsi->tsi_env, OBD_BRW_READ, exp, &repbody->oa, 1,
-                       ioo, remote_nb, &npages, local_nb, NULL);
+                       ioo, remote_nb, &npages, local_nb);
        if (rc != 0)
                GOTO(out_lock, rc);
 
@@ -1809,9 +1809,8 @@ int tgt_brw_read(struct tgt_session_info *tsi)
 
 out_commitrw:
        /* Must commit after prep above in all cases */
-       rc = obd_commitrw(tsi->tsi_env, OBD_BRW_READ, exp,
-                         &repbody->oa, 1, ioo, remote_nb, npages, local_nb,
-                         NULL, rc);
+       rc = obd_commitrw(tsi->tsi_env, OBD_BRW_READ, exp, &repbody->oa, 1, ioo,
+                         remote_nb, npages, local_nb, rc);
        if (rc == 0)
                tgt_drop_id(exp, &repbody->oa);
 out_lock:
@@ -2016,7 +2015,7 @@ int tgt_brw_write(struct tgt_session_info *tsi)
 
        npages = PTLRPC_MAX_BRW_PAGES;
        rc = obd_preprw(tsi->tsi_env, OBD_BRW_WRITE, exp, &repbody->oa,
-                       objcount, ioo, remote_nb, &npages, local_nb, NULL);
+                       objcount, ioo, remote_nb, &npages, local_nb);
        if (rc < 0)
                GOTO(out_lock, rc);
 
@@ -2070,8 +2069,7 @@ skip_transfer:
 
        /* Must commit after prep above in all cases */
        rc = obd_commitrw(tsi->tsi_env, OBD_BRW_WRITE, exp, &repbody->oa,
-                         objcount, ioo, remote_nb, npages, local_nb, NULL,
-                         rc);
+                         objcount, ioo, remote_nb, npages, local_nb, rc);
        if (rc == -ENOTCONN)
                /* quota acquire process has been given up because
                 * either the client has been evicted or the client
index b821dbd..f1ece92 100644 (file)
@@ -578,7 +578,6 @@ check_obdo(void)
        CHECK_DEFINE_64X(OBD_MD_FLHANDLE);
        CHECK_DEFINE_64X(OBD_MD_FLCKSUM);
        CHECK_DEFINE_64X(OBD_MD_FLQOS);
-       CHECK_DEFINE_64X(OBD_MD_FLCOOKIE);
        CHECK_DEFINE_64X(OBD_MD_FLGROUP);
        CHECK_DEFINE_64X(OBD_MD_FLFID);
        CHECK_DEFINE_64X(OBD_MD_FLEPOCH);
@@ -914,7 +913,7 @@ check_mdt_body(void)
        CHECK_MEMBER(mdt_body, mbo_eadatasize);
        CHECK_MEMBER(mdt_body, mbo_aclsize);
        CHECK_MEMBER(mdt_body, mbo_max_mdsize);
-       CHECK_MEMBER(mdt_body, mbo_max_cookiesize);
+       CHECK_MEMBER(mdt_body, mbo_unused3);
        CHECK_MEMBER(mdt_body, mbo_uid_h);
        CHECK_MEMBER(mdt_body, mbo_gid_h);
        CHECK_MEMBER(mdt_body, mbo_padding_5);
index 7850748..956ef28 100644 (file)
@@ -1324,8 +1324,6 @@ void lustre_assert_wire_constants(void)
                 OBD_MD_FLCKSUM);
        LASSERTF(OBD_MD_FLQOS == (0x00200000ULL), "found 0x%.16llxULL\n",
                 OBD_MD_FLQOS);
-       LASSERTF(OBD_MD_FLCOOKIE == (0x00800000ULL), "found 0x%.16llxULL\n",
-                OBD_MD_FLCOOKIE);
        LASSERTF(OBD_MD_FLGROUP == (0x01000000ULL), "found 0x%.16llxULL\n",
                 OBD_MD_FLGROUP);
        LASSERTF(OBD_MD_FLFID == (0x02000000ULL), "found 0x%.16llxULL\n",
@@ -2052,10 +2050,10 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct mdt_body, mbo_max_mdsize));
        LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_max_mdsize) == 4, "found %lld\n",
                 (long long)(int)sizeof(((struct mdt_body *)0)->mbo_max_mdsize));
-       LASSERTF((int)offsetof(struct mdt_body, mbo_max_cookiesize) == 160, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, mbo_max_cookiesize));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_max_cookiesize) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_max_cookiesize));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_unused3) == 160, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_unused3));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_unused3) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_unused3));
        LASSERTF((int)offsetof(struct mdt_body, mbo_uid_h) == 164, "found %lld\n",
                 (long long)(int)offsetof(struct mdt_body, mbo_uid_h));
        LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_uid_h) == 4, "found %lld\n",