obd_force:1, /* cleanup with > 0 obd refcount */
obd_fail:1, /* cleanup with failover */
obd_async_recov:1, /* allow asyncronous orphan cleanup */
- obd_no_conn:1; /* deny new connections */
+ obd_no_conn:1, /* deny new connections */
+ obd_inactive:1; /* device active/inactive
+ * (for /proc/status only!!) */
/* uuid-export hash body */
struct lustre_class_hash_body *obd_uuid_hash_body;
/* nid-export hash body */
struct obd_uuid lov_osc_uuid = { "LOV_OSC_UUID" };
struct lustre_handle conn = {0, };
struct obd_import *imp;
+
#ifdef __KERNEL__
cfs_proc_dir_entry_t *lov_proc_dir;
#endif
if (activate) {
lov->lov_tgts[index]->ltd_active = 1;
lov->desc.ld_active_tgt_count++;
+ lov->lov_tgts[index]->ltd_exp->exp_obd->obd_inactive = 0;
}
CDEBUG(D_CONFIG, "Connected tgt idx %d %s (%s) %sactive\n", index,
obd_uuid2str(&tgt_uuid), tgt_obd->obd_name, activate ? "":"in");
struct obd_device *osc_obd =
class_exp2obd(lov->lov_tgts[index]->ltd_exp);
int rc;
+
ENTRY;
CDEBUG(D_CONFIG, "%s: disconnecting target %s\n",
if (lov->lov_tgts[index]->ltd_active) {
lov->lov_tgts[index]->ltd_active = 0;
lov->desc.ld_active_tgt_count--;
+ lov->lov_tgts[index]->ltd_exp->exp_obd->obd_inactive = 1;
}
lov_proc_dir = lprocfs_srch(obd->obd_proc_entry, "target_obds");
activate ? "" : "in");
lov->lov_tgts[i]->ltd_active = activate;
- if (activate)
+
+ if (activate) {
lov->desc.ld_active_tgt_count++;
- else
+ lov->lov_tgts[i]->ltd_exp->exp_obd->obd_inactive = 0;
+ } else {
lov->desc.ld_active_tgt_count--;
+ lov->lov_tgts[i]->ltd_exp->exp_obd->obd_inactive = 1;
+ }
/* remove any old qos penalty */
lov->lov_tgts[i]->ltd_qos.ltq_penalty = 0;