From 3a36ecbebbbcd383b215f0dbd5fb190935f85d29 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 19 May 2009 19:52:35 +0200 Subject: [PATCH] --- yaml --- r: 147052 b: refs/heads/master c: 53674ac5a997a8eedbb2dfdc308b895170746c8b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/block/blk-core.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3f88c65fca58..2542be563509 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a411f4bbb89f1f08687b344064d6775bce1e4658 +refs/heads/master: 53674ac5a997a8eedbb2dfdc308b895170746c8b diff --git a/trunk/block/blk-core.c b/trunk/block/blk-core.c index bec1d69952d0..49065075d462 100644 --- a/trunk/block/blk-core.c +++ b/trunk/block/blk-core.c @@ -910,6 +910,15 @@ EXPORT_SYMBOL(blk_get_request); * need bouncing, by calling the appropriate masked or flagged allocator, * suitable for the target device. Otherwise the call to blk_queue_bounce will * BUG. + * + * WARNING: When allocating/cloning a bio-chain, careful consideration should be + * given to how you allocate bios. In particular, you cannot use __GFP_WAIT for + * anything but the first bio in the chain. Otherwise you risk waiting for IO + * completion of a bio that hasn't been submitted yet, thus resulting in a + * deadlock. Alternatively bios should be allocated using bio_kmalloc() instead + * of bio_alloc(), as that avoids the mempool deadlock. + * If possible a big IO should be split into smaller parts when allocation + * fails. Partial allocation should not be an error, or you risk a live-lock. */ struct request *blk_make_request(struct request_queue *q, struct bio *bio, gfp_t gfp_mask)