summaryrefslogtreecommitdiff
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2023-01-26 00:44:39 +0300
committerMike Snitzer <snitzer@kernel.org>2023-02-14 22:23:06 +0300
commit238d991f054a553e823d12b0ffd52aaeedd65f70 (patch)
tree138cfd9507e66902527d44521287ac83911a9999 /drivers/md/dm.c
parent0d78954a2d80e648cfed1d306fffe52c6211c432 (diff)
downloadlinux-238d991f054a553e823d12b0ffd52aaeedd65f70.tar.xz
dm: use fsleep() instead of msleep() for deterministic sleep duration
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 1de9d212be00..c97004b56ff0 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -436,7 +436,7 @@ retry:
r = ti->type->prepare_ioctl(ti, bdev);
if (r == -ENOTCONN && !fatal_signal_pending(current)) {
dm_put_live_table(md, *srcu_idx);
- msleep(10);
+ fsleep(10000);
goto retry;
}
@@ -2455,7 +2455,7 @@ static void __dm_destroy(struct mapped_device *md, bool wait)
set_bit(DMF_POST_SUSPENDING, &md->flags);
dm_table_postsuspend_targets(map);
}
- /* dm_put_live_table must be before msleep, otherwise deadlock is possible */
+ /* dm_put_live_table must be before fsleep, otherwise deadlock is possible */
dm_put_live_table(md, srcu_idx);
mutex_unlock(&md->suspend_lock);
@@ -2467,7 +2467,7 @@ static void __dm_destroy(struct mapped_device *md, bool wait)
*/
if (wait)
while (atomic_read(&md->holders))
- msleep(1);
+ fsleep(1000);
else if (atomic_read(&md->holders))
DMWARN("%s: Forcibly removing mapped_device still in use! (%d users)",
dm_device_name(md), atomic_read(&md->holders));
@@ -2544,7 +2544,7 @@ static int dm_wait_for_completion(struct mapped_device *md, unsigned int task_st
break;
}
- msleep(5);
+ fsleep(5000);
}
return r;