Whamcloud - gitweb
LU-4423 libcfs: remove CFS_TIME_T definition 25/27025/2
authorArnd Bergmann <arnd@arndb.de>
Tue, 9 May 2017 22:11:03 +0000 (18:11 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 29 May 2017 18:01:00 +0000 (18:01 +0000)
The CFS_TIME_T macro serves no real purpose as we stopped using time_t
and changed over to time64_t, so we can remove the last remaining uses
of this.

Two uses of this macro are incorrect and refer to jiffies values
rather than time_t, and one refers to an inode timespec that gets
changed separately.

Linux-commit: 93d3a405a168fba4450bdda793149e3cd4174736

Change-Id: I548ec8fffc9c46b8b2025b094f1e5d9cd469e3b7
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/27025
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
libcfs/include/libcfs/linux/linux-time.h
lnet/lnet/net_fault.c
lustre/mdc/mdc_reint.c
lustre/obdclass/genops.c
lustre/ptlrpc/pinger.c
lustre/ptlrpc/sec_bulk.c
lustre/ptlrpc/service.c

index dc84385..18af8f6 100644 (file)
@@ -279,7 +279,6 @@ static inline int cfs_time_beforeq_64(__u64 t1, __u64 t2)
 /*
  * One jiffy
  */
-#define CFS_TIME_T              "%lu"
 #define CFS_DURATION_T          "%ld"
 
 
index fea2f92..c43f8fe 100644 (file)
@@ -326,11 +326,10 @@ drop_rule_match(struct lnet_drop_rule *rule, lnet_nid_t src,
                        rule->dr_time_base += cfs_time_seconds(attr->u.drop.
                                                               da_interval);
 
-                       CDEBUG(D_NET, "Drop Rule %s->%s: next drop : "
-                                     CFS_TIME_T"\n",
-                                     libcfs_nid2str(attr->fa_src),
-                                     libcfs_nid2str(attr->fa_dst),
-                                     rule->dr_drop_time);
+                       CDEBUG(D_NET, "Drop Rule %s->%s: next drop : %ld\n",
+                              libcfs_nid2str(attr->fa_src),
+                              libcfs_nid2str(attr->fa_dst),
+                              rule->dr_drop_time);
                }
 
        } else { /* rate based drop */
@@ -496,11 +495,10 @@ delay_rule_match(struct lnet_delay_rule *rule, lnet_nid_t src,
                        rule->dl_time_base += cfs_time_seconds(attr->u.delay.
                                                               la_interval);
 
-                       CDEBUG(D_NET, "Delay Rule %s->%s: next delay : "
-                                     CFS_TIME_T"\n",
-                                     libcfs_nid2str(attr->fa_src),
-                                     libcfs_nid2str(attr->fa_dst),
-                                     rule->dl_delay_time);
+                       CDEBUG(D_NET, "Delay Rule %s->%s: next delay : %ld\n",
+                              libcfs_nid2str(attr->fa_src),
+                              libcfs_nid2str(attr->fa_dst),
+                              rule->dl_delay_time);
                }
 
        } else { /* rate based delay */
index 079f0b3..fb59428 100644 (file)
@@ -131,8 +131,7 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data,
        }
 
         if (op_data->op_attr.ia_valid & (ATTR_MTIME | ATTR_CTIME))
-                CDEBUG(D_INODE, "setting mtime "CFS_TIME_T
-                       ", ctime "CFS_TIME_T"\n",
+               CDEBUG(D_INODE, "setting mtime %ld, ctime %ld\n",
                        LTIME_S(op_data->op_attr.ia_mtime),
                        LTIME_S(op_data->op_attr.ia_ctime));
        mdc_setattr_pack(req, op_data, ea, ealen);
index c62e2e9..6587603 100644 (file)
@@ -1315,7 +1315,7 @@ static void class_disconnect_export_list(struct list_head *list,
 
                 class_export_get(exp);
                 CDEBUG(D_HA, "%s: disconnecting export at %s (%p), "
-                       "last request at "CFS_TIME_T"\n",
+                      "last request at %ld\n",
                        exp->exp_obd->obd_name, obd_export_nid2str(exp),
                        exp, exp->exp_last_request_time);
                 /* release one export reference anyway */
index be83aad..15fb096 100644 (file)
@@ -284,8 +284,8 @@ static int ptlrpc_pinger_main(void *arg)
                    next ping time to next_ping + .01 sec, which means
                    we will SKIP the next ping at next_ping, and the
                    ping will get sent 2 timeouts from now!  Beware. */
-                CDEBUG(D_INFO, "next wakeup in "CFS_DURATION_T" ("
-                       CFS_TIME_T")\n", time_to_next_wake,
+               CDEBUG(D_INFO, "next wakeup in "CFS_DURATION_T" (%ld)\n",
+                      time_to_next_wake,
                        cfs_time_add(this_ping,cfs_time_seconds(PING_INTERVAL)));
                 if (time_to_next_wake > 0) {
                         lwi = LWI_TIMEOUT(max_t(cfs_duration_t,
index bb4a54d..1eacdff 100644 (file)
@@ -153,8 +153,8 @@ int sptlrpc_proc_enc_pool_seq_show(struct seq_file *m, void *v)
                   "cache missing:           %lu\n"
                   "low free mark:           %lu\n"
                   "max waitqueue depth:     %u\n"
-                  "max wait time:           "CFS_TIME_T"/%lu\n"
-                  "out of mem:             %lu\n",
+                  "max wait time:           %ld/%lu\n"
+                  "out of mem:              %lu\n",
                   totalram_pages, PAGES_PER_POOL,
                   page_pools.epp_max_pages,
                   page_pools.epp_max_pools,
@@ -838,9 +838,7 @@ void sptlrpc_enc_pool_fini(void)
 
        if (page_pools.epp_st_access > 0) {
                CDEBUG(D_SEC,
-                      "max pages %lu, grows %u, grow fails %u, shrinks %u, "
-                      "access %lu, missing %lu, max qlen %u, max wait "
-                      CFS_TIME_T"/%lu, out of mem %lu\n",
+                      "max pages %lu, grows %u, grow fails %u, shrinks %u, access %lu, missing %lu, max qlen %u, max wait %ld/%lu, out of mem %lu\n",
                       page_pools.epp_st_max_pages, page_pools.epp_st_grows,
                       page_pools.epp_st_grow_fails,
                       page_pools.epp_st_shrinks, page_pools.epp_st_access,
index f7e08f4..e65bcae 100644 (file)
@@ -1104,7 +1104,7 @@ void ptlrpc_update_export_timer(struct obd_export *exp, long extra_delay)
                          * we better wait for 3. */
                         exp->exp_obd->obd_eviction_timer =
                                 cfs_time_current_sec() + 3 * PING_INTERVAL;
-                        CDEBUG(D_HA, "%s: Think about evicting %s from "CFS_TIME_T"\n",
+                       CDEBUG(D_HA, "%s: Think about evicting %s from %ld\n",
                                exp->exp_obd->obd_name,
                                obd_export_nid2str(oldest_exp), oldest_time);
                 }