sizeof(server_uuid)));
cli->cl_dirty_pages = 0;
+ cli->cl_dirty_max_pages = 0;
cli->cl_avail_grant = 0;
/* FIXME: Should limit this for the sum of all cl_dirty_max_pages. */
/* cl_dirty_max_pages may be changed at connect time in
* from OFD after connecting. */
cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES;
- cli->cl_short_io_bytes = OBD_MAX_SHORT_IO_BYTES;
+ cli->cl_max_short_io_bytes = OBD_MAX_SHORT_IO_BYTES;
/* set cl_chunkbits default value to PAGE_SHIFT,
* it will be updated at OSC connection time. */
/* allow "new" MDT to be connected during recovery, since we
* need retrieve recovery update records from it */
if (target->obd_recovering && !lw_client && !mds_mds_conn) {
+ time64_t now;
time64_t t;
+ char *msg;
int c; /* connected */
int i; /* in progress */
int k; /* known */
s = target->obd_stale_clients;
t = jiffies_to_msecs(target->obd_recovery_timer.expires);
t /= MSEC_PER_SEC;
- t -= ktime_get_seconds();
+ now = ktime_get_seconds();
+ if (now > t) {
+ t = now - t;
+ msg = "already passed deadline";
+ } else {
+ t -= now;
+ msg = "to recover in";
+ }
+
LCONSOLE_WARN("%s: Denying connection for new client %s"
"(at %s), waiting for %d known clients "
"(%d recovered, %d in progress, and %d "
- "evicted) to recover in %lld:%.02lld\n",
+ "evicted) %s %lld:%.02lld\n",
target->obd_name, cluuid.uuid,
libcfs_nid2str(req->rq_peer.nid), k,
- c - i, i, s, t / 60, t % 60);
+ c - i, i, s, msg, t / 60, t % 60);
rc = -EBUSY;
} else {
dont_check_exports:
RETURN(rc);
}
- thread->t_env = env;
- thread->t_id = -1; /* force filter_iobuf_get/put to use local buffers */
- env->le_ctx.lc_thread = thread;
+ thread->t_env = env;
+ thread->t_id = -1; /* force filter_iobuf_get/put to use local buffers */
+ env->le_ctx.lc_thread = thread;
tgt_io_thread_init(thread); /* init thread_big_cache for IO requests */
- thread->t_watchdog = NULL;
CDEBUG(D_HA, "%s: started recovery thread pid %d\n", obd->obd_name,
current_pid());