From: Jeremy Filizetti Date: Mon, 14 Dec 2015 05:33:44 +0000 (-0500) Subject: LU-3289 gss: Cleanup gss print statements and comments X-Git-Tag: 2.8.55~70 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=61d492b8bab829e401c32583ee9d86b0655a95bc LU-3289 gss: Cleanup gss print statements and comments Some minor cleanup of GSS messages and comments. Signed-off-by: Jeremy Filizetti Change-Id: I9cf4e7d7189142b47c2fb9ab13428cb65bc08754 Reviewed-on: http://review.whamcloud.com/17602 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Sebastien Buisson Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin --- diff --git a/lustre/ptlrpc/gss/sec_gss.c b/lustre/ptlrpc/gss/sec_gss.c index b5f038b..9dd7898 100644 --- a/lustre/ptlrpc/gss/sec_gss.c +++ b/lustre/ptlrpc/gss/sec_gss.c @@ -386,23 +386,25 @@ void gss_cli_ctx_uptodate(struct gss_cli_ctx *gctx) * destroying server side context when it be destroyed. */ set_bit(PTLRPC_CTX_UPTODATE_BIT, &ctx->cc_flags); - if (sec_is_reverse(ctx->cc_sec)) { - CWARN("server installed reverse ctx %p idx "LPX64", " - "expiry %lu(%+lds)\n", ctx, - gss_handle_to_u64(&gctx->gc_handle), - ctx->cc_expire, ctx->cc_expire - cfs_time_current_sec()); + if (sec_is_reverse(ctx->cc_sec)) { + CWARN("server installed reverse ctx %p idx "LPX64", " + "expiry %lu(%+lds)\n", ctx, + gss_handle_to_u64(&gctx->gc_handle), + ctx->cc_expire, + cfs_time_sub(ctx->cc_expire, cfs_time_current_sec())); } else { - CWARN("client refreshed ctx %p idx "LPX64" (%u->%s), " - "expiry %lu(%+lds)\n", ctx, - gss_handle_to_u64(&gctx->gc_handle), - ctx->cc_vcred.vc_uid, sec2target_str(ctx->cc_sec), - ctx->cc_expire, ctx->cc_expire - cfs_time_current_sec()); + CWARN("client refreshed ctx %p idx "LPX64" (%u->%s), " + "expiry %lu(%+lds)\n", ctx, + gss_handle_to_u64(&gctx->gc_handle), + ctx->cc_vcred.vc_uid, sec2target_str(ctx->cc_sec), + ctx->cc_expire, + cfs_time_sub(ctx->cc_expire, cfs_time_current_sec())); - /* install reverse svc ctx for root context */ - if (ctx->cc_vcred.vc_uid == 0) - gss_sec_install_rctx(ctx->cc_sec->ps_import, - ctx->cc_sec, ctx); - } + /* install reverse svc ctx for root context */ + if (ctx->cc_vcred.vc_uid == 0) + gss_sec_install_rctx(ctx->cc_sec->ps_import, + ctx->cc_sec, ctx); + } sptlrpc_cli_ctx_wakeup(ctx); } diff --git a/lustre/ptlrpc/sec.c b/lustre/ptlrpc/sec.c index 7d2f553..828a161 100644 --- a/lustre/ptlrpc/sec.c +++ b/lustre/ptlrpc/sec.c @@ -851,7 +851,7 @@ void sptlrpc_req_set_flavor(struct ptlrpc_request *req, int opcode) LASSERT(req->rq_cli_ctx->cc_sec); LASSERT(req->rq_bulk_read == 0 || req->rq_bulk_write == 0); - /* special security flags accoding to opcode */ + /* special security flags according to opcode */ switch (opcode) { case OST_READ: case MDS_READPAGE: