aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/moduleparam.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-10-04 14:36:19 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-10-04 14:36:19 -0400
commite00c54c36ac2024c3a8a37432e2e2698ff849594 (patch)
tree0b392ba588939a7ee0c405ada8b22047fad9daff /include/linux/moduleparam.h
parentac481c20ef8f6c6f2be75d581863f40c43874ef7 (diff)
cfq-iosched: don't delay async queue if it hasn't dispatched at all
We cannot delay for the first dispatch of the async queue if it hasn't dispatched at all, since that could present a local user DoS attack vector using an app that just did slow timed sync reads while filling memory. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/moduleparam.h')
0 files changed, 0 insertions, 0 deletions
> 292 293 294 295 296 297 298 299
/*
 * Functions related to generic helpers functions
 */
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/bio.h>
#include <linux/blkdev.h>
#include <linux/scatterlist.h>

#include "blk.h"

struct bio_batch {
	atomic_t		done;
	unsigned long		flags;
	struct completion	*wait;
};

static void bio_batch_end_io(struct bio *bio, int err)
{
	struct bio_batch *bb = bio->bi_private;

	if (err && (err != -EOPNOTSUPP))
		clear_bit(BIO_UPTODATE, &bb->flags);
	if (atomic_dec_and_test(&bb->done))
		complete(bb->wait);
	bio_put(bio);
}

/**
 * blkdev_issue_discard - queue a discard