static int lov_connect_obd(struct obd_device *obd, struct lov_tgt_desc *tgt,
int activate, unsigned long connect_flags)
{
- struct lov_obd *lov = &obd->u.lov;
- struct obd_uuid *tgt_uuid = &tgt->uuid;
- struct obd_device *tgt_obd;
struct obd_uuid lov_osc_uuid = { "LOV_OSC_UUID" };
- struct lustre_handle conn = {0, };
+ struct obd_uuid *tgt_uuid = &tgt->uuid;
+
+#ifdef __KERNEL__
struct proc_dir_entry *lov_proc_dir;
+#endif
+ struct lov_obd *lov = &obd->u.lov;
+ struct lustre_handle conn = {0, };
+ struct obd_device *tgt_obd;
int rc;
ENTRY;
tgt->active = 1;
lov->desc.ld_active_tgt_count++;
+#ifdef __KERNEL__
lov_proc_dir = lprocfs_srch(obd->obd_proc_entry, "target_obds");
if (lov_proc_dir) {
struct obd_device *osc_obd = class_conn2obd(&conn);
lov_proc_dir = NULL;
}
}
+#endif
RETURN(0);
}
static int lov_connect(struct lustre_handle *conn, struct obd_device *obd,
struct obd_uuid *cluuid, unsigned long connect_flags)
{
+#ifdef __KERNEL__
+ struct proc_dir_entry *lov_proc_dir;
+#endif
struct lov_obd *lov = &obd->u.lov;
struct lov_tgt_desc *tgt;
struct obd_export *exp;
- struct proc_dir_entry *lov_proc_dir;
int rc, rc2, i;
ENTRY;
RETURN(0);
}
+#ifdef __KERNEL__
lov_proc_dir = lprocfs_register("target_obds", obd->obd_proc_entry,
NULL, NULL);
if (IS_ERR(lov_proc_dir)) {
obd->obd_type->typ_name, obd->obd_name);
lov_proc_dir = NULL;
}
+#endif
/* connect_flags is the MDS number, save for use in lov_add_obd */
lov->lov_connect_flags = connect_flags;
RETURN (0);
out_disc:
+#ifdef __KERNEL__
if (lov_proc_dir)
lprocfs_remove(lov_proc_dir);
+#endif
while (i-- > 0) {
struct obd_uuid uuid;
static int lov_disconnect_obd(struct obd_device *obd, struct lov_tgt_desc *tgt,
int flags)
{
+#ifdef __KERNEL__
struct proc_dir_entry *lov_proc_dir;
+#endif
struct obd_device *osc_obd = class_exp2obd(tgt->ltd_exp);
struct lov_obd *lov = &obd->u.lov;
int rc;
ENTRY;
+#ifdef __KERNEL__
lov_proc_dir = lprocfs_srch(obd->obd_proc_entry, "target_obds");
if (lov_proc_dir) {
struct proc_dir_entry *osc_symlink;
osc_obd->obd_name);
}
}
-
+#endif
+
if (obd->obd_no_recov) {
/* Pass it on to our clients.
* XXX This should be an argument to disconnect,
}
obd_register_observer(tgt->ltd_exp->exp_obd, NULL);
-
rc = obd_disconnect(tgt->ltd_exp, flags);
if (rc) {
if (tgt->active) {
static int lov_disconnect(struct obd_export *exp, int flags)
{
struct obd_device *obd = class_exp2obd(exp);
+#ifdef __KERNEL__
+ struct proc_dir_entry *lov_proc_dir;
+#endif
struct lov_obd *lov = &obd->u.lov;
struct lov_tgt_desc *tgt;
- struct proc_dir_entry *lov_proc_dir;
int rc, i;
ENTRY;
if (tgt->ltd_exp)
lov_disconnect_obd(obd, tgt, flags);
}
+
+#ifdef __KERNEL__
lov_proc_dir = lprocfs_srch(obd->obd_proc_entry, "target_obds");
if (lov_proc_dir) {
lprocfs_remove(lov_proc_dir);
CERROR("/proc/fs/lustre/%s/%s/target_obds missing.",
obd->obd_type->typ_name, obd->obd_name);
}
-
+#endif
out_local:
rc = class_disconnect(exp, 0);