Whamcloud - gitweb
Move AM_CONDITIONAL into configure.in
[fs/lustre-release.git] / lustre / mds / mds_lov.c
index 30d8482..85feb9d 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/lustre_lib.h>
 
 int mds_configure_lov(struct obd_device *obd, struct lov_desc *desc,
-                      uuid_t *uuidarray)
+                      obd_uuid_t *uuidarray)
 {
         struct mds_obd *mds = &obd->u.mds;
         struct obd_run_ctxt saved;
@@ -37,7 +37,7 @@ int mds_configure_lov(struct obd_device *obd, struct lov_desc *desc,
         tgt_count = desc->ld_tgt_count;
         lov_packdesc(desc);
 
-        push_ctxt(&saved, &mds->mds_ctxt);
+        push_ctxt(&saved, &mds->mds_ctxt, NULL);
         f = filp_open("LOVDESC", O_CREAT|O_RDWR, 0644);
         if (IS_ERR(f)) {
                 CERROR("Cannot open/create LOVDESC file\n");
@@ -86,7 +86,7 @@ int mds_get_lovdesc(struct obd_device *obd, struct lov_desc *desc)
         struct file *f;
         int rc;
 
-        push_ctxt(&saved, &mds->mds_ctxt);
+        push_ctxt(&saved, &mds->mds_ctxt, NULL);
         f = filp_open("LOVDESC", O_RDONLY, 0644);
         if (!f || IS_ERR(f)) {
                 CERROR("Cannot open LOVDESC file\n");
@@ -108,7 +108,7 @@ int mds_get_lovdesc(struct obd_device *obd, struct lov_desc *desc)
         RETURN(0);
 }
 
-int mds_get_lovtgts(struct obd_device *obd, int tgt_count, uuid_t *uuidarray)
+int mds_get_lovtgts(struct obd_device *obd, int tgt_count,obd_uuid_t *uuidarray)
 {
         struct mds_obd *mds = &obd->u.mds;
         struct obd_run_ctxt saved;
@@ -116,7 +116,7 @@ int mds_get_lovtgts(struct obd_device *obd, int tgt_count, uuid_t *uuidarray)
         int rc;
         int rc2;
 
-        push_ctxt(&saved, &mds->mds_ctxt);
+        push_ctxt(&saved, &mds->mds_ctxt, NULL);
         f = filp_open("LOVTGTS", O_RDONLY, 0644);
         if (IS_ERR(f)) {
                 CERROR("Cannot open LOVTGTS file\n");
@@ -149,6 +149,7 @@ int mds_iocontrol(long cmd, struct lustre_handle *conn,
         struct obd_device *obd = class_conn2obd(conn);
         struct obd_ioctl_data *data = karg;
         struct lov_desc *desc;
+        obd_uuid_t *uuidarray;
         int count;
         int rc;
 
@@ -162,11 +163,12 @@ int mds_iocontrol(long cmd, struct lustre_handle *conn,
                 }
 
                 count = desc->ld_tgt_count;
-                if (sizeof(uuid_t) * count != data->ioc_inllen2) {
+                uuidarray = (obd_uuid_t *)data->ioc_inlbuf2;
+                if (sizeof(*uuidarray) * count != data->ioc_inllen2) {
                         CERROR("UUID array size wrong\n");
                         RETURN(-EINVAL);
                 }
-                rc = mds_configure_lov(obd, desc, (uuid_t *)data->ioc_inlbuf2);
+                rc = mds_configure_lov(obd, desc, uuidarray);
 
                 RETURN(rc);
         default: