[PATCH] separate bdi congestion functions from queue congestion functions

Separate out the concept of "queue congestion" from "backing-dev congestion".
Congestion is a backing-dev concept, not a queue concept.

The blk_* congestion functions are retained, as wrappers around the core
backing-dev congestion functions.

This proper layering is needed so that NFS can cleanly use the congestion
functions, and so that CONFIG_BLOCK=n actually links.

Cc: "Thomas Maier" <[email protected]>
Cc: "Jens Axboe" <[email protected]>
Cc: Trond Myklebust <[email protected]>
Cc: David Howells <[email protected]>
Cc: Peter Osterlund <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Andrew Morton 2006-10-19 23:28:16 -07:00 • committed by Linus Torvalds
commit 3fcfab16c5
17 changed files with 126 additions and 104 deletions

View file

@ -16,6 +16,7 @@
#include <linux/slab.h>
#include <linux/crypto.h>
#include <linux/workqueue.h>
#include <linux/backing-dev.h>
#include <asm/atomic.h>
#include <linux/scatterlist.h>
#include <asm/page.h>
@ -602,7 +603,7 @@ static void process_write(struct crypt_io *io)
/* out of memory -> run queues */
if (remaining)
blk_congestion_wait(bio_data_dir(clone), HZ/100);
congestion_wait(bio_data_dir(clone), HZ/100);
}
}