X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fptlrpc%2Fgss%2Fgss_pipefs.c;h=5e1e7caa1aae6a08a066a0b665b8b773ee3dd975;hb=d7d7eb50c8f5fd3fc5a7808fb112d233bdef34d7;hp=6b1d9e46dfd3bb8dc83f6412bf7ba5ef4fe3a789;hpb=91ef75669c7e41091378a8401ca0c093b7f17174;p=fs%2Flustre-release.git diff --git a/lustre/ptlrpc/gss/gss_pipefs.c b/lustre/ptlrpc/gss/gss_pipefs.c index 6b1d9e4..5e1e7ca 100644 --- a/lustre/ptlrpc/gss/gss_pipefs.c +++ b/lustre/ptlrpc/gss/gss_pipefs.c @@ -3,7 +3,7 @@ * * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * - * Copyright (c) 2012, 2014, Intel Corporation. + * Copyright (c) 2012, 2016, Intel Corporation. * * Author: Eric Mei */ @@ -62,7 +62,7 @@ struct rpc_clnt; /* for rpc_pipefs */ #include #include #include -#include +#include #include #include #include @@ -338,8 +338,8 @@ void gss_ctx_cache_gc_pf(struct gss_sec_pipefs *gsec_pf, ctx_check_death_locked_pf(ctx, freelist); } - sec->ps_gc_next = cfs_time_current_sec() + sec->ps_gc_interval; - EXIT; + sec->ps_gc_next = ktime_get_real_seconds() + sec->ps_gc_interval; + EXIT; } static @@ -440,12 +440,12 @@ struct ptlrpc_cli_ctx * gss_sec_lookup_ctx_pf(struct ptlrpc_sec *sec, retry: spin_lock(&sec->ps_lock); - /* gc_next == 0 means never do gc */ - if (remove_dead && sec->ps_gc_next && - cfs_time_after(cfs_time_current_sec(), sec->ps_gc_next)) { - gss_ctx_cache_gc_pf(gsec_pf, &freelist); - gc = 1; - } + /* gc_next == 0 means never do gc */ + if (remove_dead && sec->ps_gc_next && + (ktime_get_real_seconds() > sec->ps_gc_next)) { + gss_ctx_cache_gc_pf(gsec_pf, &freelist); + gc = 1; + } cfs_hlist_for_each_entry_safe(ctx, pos, next, hash_head, cc_cache) { if (gc == 0 && @@ -950,7 +950,7 @@ void gss_pipe_destroy_msg(struct rpc_pipe_msg *msg) { struct gss_upcall_msg *gmsg; struct gss_upcall_msg_data *gumd; - static cfs_time_t ratelimit = 0; + static time64_t ratelimit; ENTRY; LASSERT(list_empty(&msg->list)); @@ -973,9 +973,9 @@ void gss_pipe_destroy_msg(struct rpc_pipe_msg *msg) atomic_inc(&gmsg->gum_refcount); gss_unhash_msg(gmsg); if (msg->errno == -ETIMEDOUT || msg->errno == -EPIPE) { - cfs_time_t now = cfs_time_current_sec(); + time64_t now = ktime_get_real_seconds(); - if (cfs_time_after(now, ratelimit)) { + if (now > ratelimit) { CWARN("upcall timed out, is lgssd running?\n"); ratelimit = now + 15; }