dm io: remove BIOSET_NEED_RESCUER flag from bios bioset
authorNeilBrown <neilb@suse.com>
Tue, 29 Aug 2017 22:10:18 +0000 (08:10 +1000)
committerMike Snitzer <snitzer@redhat.com>
Wed, 13 Dec 2017 17:15:56 +0000 (12:15 -0500)
The BIOSET_NEED_RESCUER flag is only needed when a make_request_fn might
do two allocations from the one bioset, and the second one could block
until the first bio completes.

dm_io() is called from make_request_fn() context.  The closest it comes
to multiple allocations is in chunk_io() in dm-snap-persistent.  But
there the code uses a separate thread to avoid problems.

So BIOSET_NEED_RESCUER is not needed.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-io.c

index b4357ed4d541621fa69eec798fdb3a7d85ae68a4..a8d914d5abbe6c91b4050349c46e80ad02f26249 100644 (file)
@@ -58,8 +58,7 @@ struct dm_io_client *dm_io_client_create(void)
        if (!client->pool)
                goto bad;
 
-       client->bios = bioset_create(min_ios, 0, (BIOSET_NEED_BVECS |
-                                                 BIOSET_NEED_RESCUER));
+       client->bios = bioset_create(min_ios, 0, BIOSET_NEED_BVECS);
        if (!client->bios)
                goto bad;