Whamcloud - gitweb
LU-3289 gss: Cleanup gss print statements and comments 02/17602/11
authorJeremy Filizetti <jeremy.filizetti@gmail.com>
Mon, 14 Dec 2015 05:33:44 +0000 (00:33 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 13 Jun 2016 17:16:45 +0000 (17:16 +0000)
Some minor cleanup of GSS messages and comments.

Signed-off-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Change-Id: I9cf4e7d7189142b47c2fb9ab13428cb65bc08754
Reviewed-on: http://review.whamcloud.com/17602
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/gss/sec_gss.c
lustre/ptlrpc/sec.c

index b5f038b..9dd7898 100644 (file)
@@ -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);
 
          * 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 {
         } 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);
 }
 
         sptlrpc_cli_ctx_wakeup(ctx);
 }
index 7d2f553..828a161 100644 (file)
@@ -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);
 
         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:
         switch (opcode) {
         case OST_READ:
         case MDS_READPAGE: