@@ -72,15 +72,15 @@ struct ceph_options {
/*
* defaults
*/
-#define CEPH_MOUNT_TIMEOUT_DEFAULT msecs_to_jiffies(60 * 1000)
-#define CEPH_OSD_KEEPALIVE_DEFAULT msecs_to_jiffies(5 * 1000)
-#define CEPH_OSD_IDLE_TTL_DEFAULT msecs_to_jiffies(60 * 1000)
+#define CEPH_MOUNT_TIMEOUT_DEFAULT secs_to_jiffies(60)
+#define CEPH_OSD_KEEPALIVE_DEFAULT secs_to_jiffies(5)
+#define CEPH_OSD_IDLE_TTL_DEFAULT secs_to_jiffies(60)
#define CEPH_OSD_REQUEST_TIMEOUT_DEFAULT 0 /* no timeout */
#define CEPH_READ_FROM_REPLICA_DEFAULT 0 /* read from primary */
-#define CEPH_MONC_HUNT_INTERVAL msecs_to_jiffies(3 * 1000)
-#define CEPH_MONC_PING_INTERVAL msecs_to_jiffies(10 * 1000)
-#define CEPH_MONC_PING_TIMEOUT msecs_to_jiffies(30 * 1000)
+#define CEPH_MONC_HUNT_INTERVAL secs_to_jiffies(3)
+#define CEPH_MONC_PING_INTERVAL secs_to_jiffies(10)
+#define CEPH_MONC_PING_TIMEOUT secs_to_jiffies(30)
#define CEPH_MONC_HUNT_BACKOFF 2
#define CEPH_MONC_HUNT_MAX_MULT 10
@@ -527,29 +527,23 @@ int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt,
case Opt_osdkeepalivetimeout:
/* 0 isn't well defined right now, reject it */
- if (result.uint_32 < 1 || result.uint_32 > INT_MAX / 1000)
+ if (result.uint_32 < 1)
goto out_of_range;
- opt->osd_keepalive_timeout =
- msecs_to_jiffies(result.uint_32 * 1000);
+ opt->osd_keepalive_timeout = secs_to_jiffies(result.uint_32);
break;
case Opt_osd_idle_ttl:
/* 0 isn't well defined right now, reject it */
- if (result.uint_32 < 1 || result.uint_32 > INT_MAX / 1000)
+ if (result.uint_32 < 1)
goto out_of_range;
- opt->osd_idle_ttl = msecs_to_jiffies(result.uint_32 * 1000);
+ opt->osd_idle_ttl = secs_to_jiffies(result.uint_32);
break;
case Opt_mount_timeout:
/* 0 is "wait forever" (i.e. infinite timeout) */
- if (result.uint_32 > INT_MAX / 1000)
- goto out_of_range;
- opt->mount_timeout = msecs_to_jiffies(result.uint_32 * 1000);
+ opt->mount_timeout = secs_to_jiffies(result.uint_32);
break;
case Opt_osd_request_timeout:
/* 0 is "wait forever" (i.e. infinite timeout) */
- if (result.uint_32 > INT_MAX / 1000)
- goto out_of_range;
- opt->osd_request_timeout =
- msecs_to_jiffies(result.uint_32 * 1000);
+ opt->osd_request_timeout = secs_to_jiffies(result.uint_32);
break;
case Opt_share:
@@ -4989,8 +4989,7 @@ int ceph_osdc_notify(struct ceph_osd_client *osdc,
linger_submit(lreq);
ret = linger_reg_commit_wait(lreq);
if (!ret)
- ret = linger_notify_finish_wait(lreq,
- msecs_to_jiffies(2 * timeout * MSEC_PER_SEC));
+ ret = linger_notify_finish_wait(lreq, secs_to_jiffies(2 * timeout));
else
dout("lreq %p failed to initiate notify %d\n", lreq, ret);