class_export_get(exp);
spin_unlock(&obd->obd_dev_lock);
LCONSOLE_WARN("%s: haven't heard from %s in %ld"
- " seconds. I think it's dead, "
- "and I am evicting it.\n",
- obd->obd_name,
+ " seconds. Last request was at %ld. "
+ "I think it's dead, and I am evicting "
+ "it.\n", obd->obd_name,
obd_export_nid2str(exp),
(long)(CURRENT_SECONDS -
- exp->exp_last_request_time));
+ exp->exp_last_request_time),
+ exp->exp_last_request_time);
class_fail_export(exp);
/* Note - racing to start/reset the obd_eviction timer is safe */
if (exp->exp_obd->obd_eviction_timer == 0) {
+ unsigned long interval = PING_INTERVAL;
+
/* Check if the oldest entry is expired. */
if (CURRENT_SECONDS > (oldest_time +
(3 * obd_timeout / 2) + extra_delay)) {
- /* We need a second timer, in case the net was
- * down and it just came back. Since the pinger
- * may skip every other PING_INTERVAL (see note in
+ /* We need a second timer, in case the net was down and
+ * it just came back. Since the pinger may skip every
+ * other {PING|STATFS}_INTERVAL (see note in
* ptlrpc_pinger_main), we better wait for 3. */
+
+ if (IMP_CROW_ABLE(class_exp2cliimp(exp)))
+ interval = STATFS_INTERVAL;
+
exp->exp_obd->obd_eviction_timer = CURRENT_SECONDS +
- 3 * PING_INTERVAL;
+ 3 * interval;
CDEBUG(D_HA, "%s: Think about evicting %s from %ld\n",
exp->exp_obd->obd_name, obd_export_nid2str(exp),
oldest_time);
struct lov_stripe_md **ea, struct obd_trans_info *oti)
{
struct osc_creator *oscc = &exp->exp_obd->u.cli.cl_oscc;
- struct obd_connect_data *ocd;
int try_again = 1, rc = 0;
ENTRY;
!!(oa->o_flags & OBD_FL_CREATE_CROW) !=
!!(oa->o_flags & OBD_FL_RECREATE_OBJS)));
- ocd = &class_exp2cliimp(exp)->imp_connect_data;
-
/* perform urgent create if asked or import is not crow capable or
* ENOSPC case if detected. */
- if (OBDO_URGENT_CREATE(oa) || !OCD_CROW_ABLE(ocd) ||
+ if (OBDO_URGENT_CREATE(oa) || !IMP_CROW_ABLE(class_exp2cliimp(exp)) ||
osc_check_nospc(exp)) {
CDEBUG(D_HA, "perform urgent create\n");
+ oa->o_flags &= ~OBD_FL_CREATE_CROW;
+ if (!oa->o_flags)
+ oa->o_valid &= ~OBD_MD_FLFLAGS;
rc = osc_real_create(exp, oa, ea, oti);
RETURN(rc);
}
imp->imp_connect_data.ocd_connect_flags) ==
ocd->ocd_connect_flags);
- if (OCD_CROW_ABLE(ocd)) {
+ imp->imp_connect_data = *ocd;
+
+ if (IMP_CROW_ABLE(imp)) {
CDEBUG(D_HA, "connected to CROW capable target: %s\n",
imp->imp_target_uuid.uuid);
}
- imp->imp_connect_data = *ocd;
if (imp->imp_conn_current != NULL) {
list_del(&imp->imp_conn_current->oic_item);
list_add(&imp->imp_conn_current->oic_item,