]> git.baikalelectronics.ru Git - kernel.git/commit
null_blk: guarantee device restart in all irq modes
authorArianna Avanzini <avanzini@google.com>
Tue, 1 Dec 2015 10:48:18 +0000 (11:48 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 1 Dec 2015 17:52:10 +0000 (10:52 -0700)
commitf3465ce5e0ab6f604d6c82b3a4a0d4c7015187bb
tree81f99d356c0adb2f806782aa491097009c1616cc
parent4bad3af03a16ee0d381aa9c6e93a38f8cbca1d59
null_blk: guarantee device restart in all irq modes

In single-queue (block layer) mode,the function null_rq_prep_fn stops
the device if alloc_cmd fails. Then, once stopped, the device must be
restarted on the next command completion, so that the request(s) for
which alloc_cmd failed can be requeued. Otherwise the device hangs.

Unfortunately, device restart is currently performed only for delayed
completions, i.e., in irqmode==2. This fact causes hangs, for the
above reasons, with the other irqmodes in combination with single-queue
block layer.

This commits addresses this issue by making sure that, if stopped, the
device is properly restarted for all irqmodes on completions.

Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Arianna AVanzini <avanzini@google.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/null_blk.c