return r;
}
-static inline void cfs_slow_warning(cfs_time_t now, int seconds, char *msg)
-{
- if (cfs_time_after(cfs_time_current(),
- cfs_time_add(now, cfs_time_seconds(15))))
- CERROR("slow %s "CFS_TIME_T" sec\n", msg,
- cfs_duration_sec(cfs_time_sub(cfs_time_current(),now)));
-}
-
#define CFS_RATELIMIT(seconds) \
({ \
/* \
cfs_fs_time_usec(&time, tv);
}
+#define CFS_TICK 1
+
/*
* return valid time-out based on user supplied one. Currently we only check
* that time-out is not shorted than allowed.
*/
static inline cfs_duration_t cfs_timeout_cap(cfs_duration_t timeout)
{
- if (timeout < CFS_TICK)
- timeout = CFS_TICK;
- return timeout;
+ if (timeout < CFS_TICK)
+ timeout = CFS_TICK;
+ return timeout;
}
#endif