struct cache_obd *cobd = &dev->u.cobd;
struct obd_device *target;
struct obd_device *cache;
+ struct obd_uuid target_uuid;
+ struct obd_uuid cache_uuid;
int rc;
if (data->ioc_inlbuf1 == NULL ||
data->ioc_inlbuf2 == NULL)
return (-EINVAL);
- target = class_uuid2obd (data->ioc_inlbuf1);
- cache = class_uuid2obd (data->ioc_inlbuf2);
+ obd_str2uuid(&target_uuid, data->ioc_inlbuf1);
+ target = class_uuid2obd (&target_uuid);
+
+ obd_str2uuid(&cache_uuid, data->ioc_inlbuf2);
+ cache = class_uuid2obd (&cache_uuid);
if (target == NULL ||
cache == NULL)
return (-EINVAL);
/* don't bother checking attached/setup;
* obd_connect() should, and it can change underneath us */
-
- rc = obd_connect (&cobd->cobd_target, target, NULL, NULL, NULL);
+ rc = obd_connect (&cobd->cobd_target, target, &target_uuid, NULL, NULL);
if (rc != 0)
return (rc);
- rc = obd_connect (&cobd->cobd_cache, cache, NULL, NULL, NULL);
+ rc = obd_connect (&cobd->cobd_cache, cache, &cache_uuid, NULL, NULL);
if (rc != 0)
goto fail_0;
static int
cobd_connect (struct lustre_handle *conn, struct obd_device *obd,
- obd_uuid_t cluuid, struct recovd_obd *recovd,
+ struct obd_uuid *cluuid, struct recovd_obd *recovd,
ptlrpc_recovery_cb_t recover)
{
int rc = class_connect (conn, obd, cluuid);
else {
exp = class_conn2export (conn);
LASSERT(exp != NULL);
- rc = snprintf(page, count, "%s\n", exp->exp_obd->obd_uuid);
+ rc = snprintf(page, count, "%s\n", exp->exp_obd->obd_uuid.uuid);
}
return (rc);
}
else {
exp = class_conn2export (conn);
LASSERT (exp != NULL);
- rc = snprintf(page, count, "%s\n", exp->exp_obd->obd_uuid);
+ rc = snprintf(page, count, "%s\n", exp->exp_obd->obd_uuid.uuid);
}
return (rc);
}
struct ptlbd_obd *ptlbd = &obddev->u.ptlbd;
struct obd_import *imp = &ptlbd->bd_import;
struct obd_ioctl_data* data = buf;
- obd_uuid_t server_uuid;
+ struct obd_uuid server_uuid;
ENTRY;
if ( ptlbd->bd_import.imp_connection != NULL )
RETURN(-EINVAL);
}
- memcpy(server_uuid, data->ioc_inlbuf1, MIN(data->ioc_inllen1,
- sizeof(server_uuid)));
+ obd_str2uuid(&server_uuid, data->ioc_inlbuf1);
- imp->imp_connection = ptlrpc_uuid_to_connection(server_uuid);
+ imp->imp_connection = ptlrpc_uuid_to_connection(&server_uuid);
if (!imp->imp_connection)
RETURN(-ENOENT);
#if 0
static int ptlbd_cl_connect(struct lustre_handle *conn, struct obd_device *obd,
- obd_uuid_t cluuid, struct recovd_obd *recovd,
+ struct obd_uuid cluuid, struct recovd_obd *recovd,
ptlrpc_recovery_cb_t recover)
{
struct ptlbd_obd *ptlbd = &obd->u.ptlbd;
{
#if 0
struct obd_ioctl_data* data = buf;
- obd_uuid_t server_uuid;
+ struct obd_uuid server_uuid;
#endif
struct ptlbd_obd *ptlbd = &obddev->u.ptlbd;
int rc;
#if 0
static int ptlbd_sv_connect(struct lustre_handle *conn, struct obd_device *src,
- obd_uuid_t cluuid, struct recovd_obd *recovd,
+ struct obd_uuid cluuid, struct recovd_obd *recovd,
ptlrpc_recovery_cb_t recover)
{
return class_connect(conn, src, cluuid);