Whamcloud - gitweb
LU-6017 obd: remove destroy cookie handling
[fs/lustre-release.git] / lustre / mdc / mdc_request.c
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);
 }