From: Shaohua Li Date: Tue, 31 Dec 2013 03:38:50 +0000 (+0800) Subject: blk-mq: Don't reserve a tag for flush request X-Git-Tag: v3.14-rc3~22^2~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0276924fa35a3607920a58cf5d878212824b951;p=pandora-kernel.git blk-mq: Don't reserve a tag for flush request Reserving a tag (request) for flush to avoid dead lock is a overkill. A tag is valuable resource. We can track the number of flush requests and disallow having too many pending flush requests allocated. With this patch, blk_mq_alloc_request_pinned() could do a busy nop (but not a dead loop) if too many pending requests are allocated and new flush request is allocated. But this should not be a problem, too many pending flush requests are very rare case. I verified this can fix the deadlock caused by too many pending flush requests. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe --- Reading git-diff-tree failed