From: Arnd Bergmann Date: Tue, 9 May 2017 22:11:03 +0000 (-0400) Subject: LU-4423 libcfs: remove CFS_TIME_T definition X-Git-Tag: 2.9.59~72 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=123b3c6e5edc0934ecaa98962d6bb633d1410cea LU-4423 libcfs: remove CFS_TIME_T definition 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 Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/27025 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin --- diff --git a/libcfs/include/libcfs/linux/linux-time.h b/libcfs/include/libcfs/linux/linux-time.h index dc84385..18af8f6 100644 --- a/libcfs/include/libcfs/linux/linux-time.h +++ b/libcfs/include/libcfs/linux/linux-time.h @@ -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" diff --git a/lnet/lnet/net_fault.c b/lnet/lnet/net_fault.c index fea2f92..c43f8fe 100644 --- a/lnet/lnet/net_fault.c +++ b/lnet/lnet/net_fault.c @@ -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 */ diff --git a/lustre/mdc/mdc_reint.c b/lustre/mdc/mdc_reint.c index 079f0b3..fb59428 100644 --- a/lustre/mdc/mdc_reint.c +++ b/lustre/mdc/mdc_reint.c @@ -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); diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index c62e2e9..6587603 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -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 */ diff --git a/lustre/ptlrpc/pinger.c b/lustre/ptlrpc/pinger.c index be83aad..15fb096 100644 --- a/lustre/ptlrpc/pinger.c +++ b/lustre/ptlrpc/pinger.c @@ -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, diff --git a/lustre/ptlrpc/sec_bulk.c b/lustre/ptlrpc/sec_bulk.c index bb4a54d..1eacdff 100644 --- a/lustre/ptlrpc/sec_bulk.c +++ b/lustre/ptlrpc/sec_bulk.c @@ -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, diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index f7e08f4..e65bcae 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -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); }