Whamcloud - gitweb
add in sanity test of "rename across fs", which now cause oops anyway.
[fs/lustre-release.git] / lustre / cobd / cache_obd.c
index 884d82b..bb3bbcf 100644 (file)
@@ -126,6 +126,7 @@ cobd_get_exp(struct obd_device *obd)
 
 static int client_obd_connect(struct obd_device *obd, char *name,
                               struct lustre_handle *conn,
+                              struct obd_connect_data *data,
                               unsigned long flags)
 { 
         struct obd_device *cli_obd;
@@ -142,7 +143,7 @@ static int client_obd_connect(struct obd_device *obd, char *name,
                        obd->obd_name, name);
                 RETURN(-EINVAL);
         }
-        rc = obd_connect(conn, cli_obd, &obd->obd_uuid, flags);
+        rc = obd_connect(conn, cli_obd, &obd->obd_uuid, data, flags);
         if (rc) {
                 CERROR("error connecting to %s, err %d\n",
                        name, rc);
@@ -172,7 +173,8 @@ static int client_obd_disconnect(struct obd_device *obd,
 
 static int
 cobd_connect(struct lustre_handle *conn, struct obd_device *obd,
-             struct obd_uuid *cluuid, unsigned long flags)
+             struct obd_uuid *cluuid, struct obd_connect_data *data,
+             unsigned long flags)
 {
         struct lustre_handle cache_conn = { 0 };
         struct cache_obd *cobd = &obd->u.cobd;
@@ -188,7 +190,7 @@ cobd_connect(struct lustre_handle *conn, struct obd_device *obd,
 
         /* connecting cache */
         rc = client_obd_connect(obd, cobd->cache_name,
-                                &cache_conn, flags);
+                                &cache_conn, data, flags);
         if (rc)
                 GOTO(err_discon, rc);
         cobd->cache_exp = class_conn2export(&cache_conn);
@@ -351,7 +353,7 @@ static int cobd_precleanup(struct obd_device *obd, int flags)
 }
 
 static int cobd_getattr(struct obd_export *exp, struct obdo *oa,
-                        struct lov_stripe_md *lsm)
+                        struct lov_stripe_md *ea)
 {
         struct obd_device *obd = class_exp2obd(exp);
         struct obd_export *cobd_exp;
@@ -362,7 +364,7 @@ static int cobd_getattr(struct obd_export *exp, struct obdo *oa,
                 return -EINVAL;
         }
         cobd_exp = cobd_get_exp(obd);
-        return obd_getattr(cobd_exp, oa, lsm);
+        return obd_getattr(cobd_exp, oa, ea);
 }
 
 static int cobd_getattr_async(struct obd_export *exp,
@@ -731,7 +733,8 @@ static int cobd_iocontrol(unsigned int cmd, struct obd_export *exp,
                         struct lustre_handle conn = {0};
 
                         rc = client_obd_disconnect(obd, cobd->master_exp, 0);
-                        rc = client_obd_connect(obd, cobd->cache_name, &conn, 0);
+                        rc = client_obd_connect(obd, cobd->cache_name, &conn,
+                                                NULL, 0);
                         if (rc)
                                 GOTO(out, rc);
                         cobd->cache_exp = class_conn2export(&conn);
@@ -750,7 +753,8 @@ static int cobd_iocontrol(unsigned int cmd, struct obd_export *exp,
                         cooksize = cache->u.cli.cl_max_mds_cookiesize;
                         
                         rc = client_obd_disconnect(obd, cobd->cache_exp, 0);
-                        rc = client_obd_connect(obd, cobd->master_name, &conn, 0);
+                        rc = client_obd_connect(obd, cobd->master_name, &conn,
+                                                NULL, 0);
                         if (rc)
                                 GOTO(out, rc);
                         cobd->master_exp = class_conn2export(&conn);
@@ -870,8 +874,8 @@ static int  cobd_import_event(struct obd_device *obd,
 }
 
 static int cobd_md_getattr(struct obd_export *exp, struct lustre_id *id,
-                           __u64 valid, unsigned int ea_size,
-                           struct ptlrpc_request **request)
+                          __u64 valid, const char *ea_name, int ea_namelen,
+                           unsigned int ea_size, struct ptlrpc_request **request)
 {
         struct obd_device *obd = class_exp2obd(exp);
         struct obd_export *cobd_exp;
@@ -882,7 +886,7 @@ static int cobd_md_getattr(struct obd_export *exp, struct lustre_id *id,
                 return -EINVAL;
         }
         cobd_exp = cobd_get_exp(obd);
-        return md_getattr(cobd_exp, id, valid, ea_size, request);
+        return md_getattr(cobd_exp, id, valid, NULL, 0, ea_size, request);
 }
 
 static int cobd_md_req2lustre_md (struct obd_export *mdc_exp, 
@@ -1197,7 +1201,7 @@ static int cobd_md_intent_lock(struct obd_export *exp, struct lustre_id *pid,
 }
 
 static struct obd_device *cobd_md_get_real_obd(struct obd_export *exp,
-                                               char *name, int len)
+                                               struct lustre_id *id)
 {
         struct obd_device *obd = class_exp2obd(exp);
         struct obd_export *cobd_exp;
@@ -1208,7 +1212,7 @@ static struct obd_device *cobd_md_get_real_obd(struct obd_export *exp,
                 return NULL;
         }
         cobd_exp = cobd_get_exp(obd);
-        return md_get_real_obd(cobd_exp, name, len);
+        return md_get_real_obd(cobd_exp, id);
 }
 
 static int cobd_md_change_cbdata_name(struct obd_export *exp,