From 2ab9e98b300c35d3b7807f74d404ce3c5de33fb3 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 22 Nov 2012 15:14:17 +0100 Subject: [PATCH] Restore BUSY_OK bypassing of bitmap Signed-off-by: Jens Axboe --- io_u.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/io_u.c b/io_u.c index d6816068..aff24eb8 100644 --- a/io_u.c +++ b/io_u.c @@ -42,7 +42,8 @@ static void mark_random_map(struct thread_data *td, struct io_u *io_u) block = (io_u->offset - f->file_offset) / (unsigned long long) min_bs; nr_blocks = (io_u->buflen + min_bs - 1) / min_bs; - nr_blocks = bitmap_set_nr(f->io_bitmap, block, nr_blocks); + if (!(io_u->flags & IO_U_F_BUSY_OK)) + nr_blocks = bitmap_set_nr(f->io_bitmap, block, nr_blocks); if ((nr_blocks * min_bs) < io_u->buflen) io_u->buflen = nr_blocks * min_bs; -- 2.25.1