diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/debug/delay-gen/src/delay-gen.c | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 4 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-helpers.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/xlators/debug/delay-gen/src/delay-gen.c b/xlators/debug/delay-gen/src/delay-gen.c index 76efacb3044..4698f1fd785 100644 --- a/xlators/debug/delay-gen/src/delay-gen.c +++ b/xlators/debug/delay-gen/src/delay-gen.c @@ -27,7 +27,7 @@ delay_gen(xlator_t *this, int fop) return 0; if ((rand() % DELAY_GRANULARITY) < dg->delay_ppm) - usleep(dg->delay_duration); + gf_nanosleep(dg->delay_duration * GF_US_IN_NS); return 0; } diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c index 3bbc7dca20e..c98cf48fbcf 100644 --- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c +++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c @@ -4167,10 +4167,10 @@ stop_gsync(char *master, char *slave, char **msg, char *conf_path, * still be alive, give some more time * before SIGKILL (hack) */ - usleep(50000); + gf_nanosleep(50000 * GF_US_IN_NS); break; } - usleep(50000); + gf_nanosleep(50000 * GF_US_IN_NS); } kill(-pid, SIGKILL); sys_unlink(pidfile); diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index b3e55e4fd5c..bb20a93f797 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -2473,7 +2473,7 @@ posix_fsyncer(void *d) count = posix_fsyncer_pick(this, &list); - usleep(priv->batch_fsync_delay_usec); + gf_nanosleep(priv->batch_fsync_delay_usec * GF_US_IN_NS); gf_msg_debug(this->name, 0, "picked %d fsyncs", count); |