]> git.baikalelectronics.ru Git - kernel.git/commit
md: provide generic support for handling unplug callbacks.
authorNeilBrown <neilb@suse.de>
Mon, 18 Apr 2011 08:25:42 +0000 (18:25 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 18 Apr 2011 08:25:42 +0000 (18:25 +1000)
commit5fb473cad5b8856ca675d35b0009ea235b5fe31a
treed4e2f930850eb3981307a3eec8c86399dcebf68a
parent5882c08cbb9365c957de950ced442e560e6925d4
md: provide generic support for handling unplug callbacks.

When an md device adds a request to a queue, it can call
mddev_check_plugged.
If this succeeds then we know that the md thread will be woken up
shortly, and ->plug_cnt will be non-zero until then, so some
processing can be delayed.

If it fails, then no unplug callback is expected and the make_request
function needs to do whatever is required to make the request happen.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c
drivers/md/md.h