git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a real API for dealing with blk_congestion_wait()
[pandora-kernel.git]
/
block
/
ll_rw_blk.c
diff --git
a/block/ll_rw_blk.c
b/block/ll_rw_blk.c
index
5813d63
..
dcbd6ff
100644
(file)
--- a/
block/ll_rw_blk.c
+++ b/
block/ll_rw_blk.c
@@
-2516,7
+2516,7
@@
EXPORT_SYMBOL_GPL(blk_execute_rq_nowait);
int blk_execute_rq(request_queue_t *q, struct gendisk *bd_disk,
struct request *rq, int at_head)
{
int blk_execute_rq(request_queue_t *q, struct gendisk *bd_disk,
struct request *rq, int at_head)
{
- DECLARE_COMPLETION(wait);
+ DECLARE_COMPLETION
_ONSTACK
(wait);
char sense[SCSI_SENSE_BUFFERSIZE];
int err = 0;
char sense[SCSI_SENSE_BUFFERSIZE];
int err = 0;
@@
-2734,6
+2734,18
@@
long blk_congestion_wait(int rw, long timeout)
EXPORT_SYMBOL(blk_congestion_wait);
EXPORT_SYMBOL(blk_congestion_wait);
+/**
+ * blk_congestion_end - wake up sleepers on a congestion queue
+ * @rw: READ or WRITE
+ */
+void blk_congestion_end(int rw)
+{
+ wait_queue_head_t *wqh = &congestion_wqh[rw];
+
+ if (waitqueue_active(wqh))
+ wake_up(wqh);
+}
+
/*
* Has to be called with the request spinlock acquired
*/
/*
* Has to be called with the request spinlock acquired
*/
@@
-3491,8
+3503,8
@@
EXPORT_SYMBOL(end_request);
void blk_rq_bio_prep(request_queue_t *q, struct request *rq, struct bio *bio)
{
void blk_rq_bio_prep(request_queue_t *q, struct request *rq, struct bio *bio)
{
- /* first t
hree
bits are identical in rq->flags and bio->bi_rw */
- rq->flags |= (bio->bi_rw &
7
);
+ /* first t
wo
bits are identical in rq->flags and bio->bi_rw */
+ rq->flags |= (bio->bi_rw &
3
);
rq->nr_phys_segments = bio_phys_segments(q, bio);
rq->nr_hw_segments = bio_hw_segments(q, bio);
rq->nr_phys_segments = bio_phys_segments(q, bio);
rq->nr_hw_segments = bio_hw_segments(q, bio);
@@
-3628,6
+3640,8
@@
struct io_context *current_io_context(gfp_t gfp_flags)
ret->nr_batch_requests = 0; /* because this is 0 */
ret->aic = NULL;
ret->cic_root.rb_node = NULL;
ret->nr_batch_requests = 0; /* because this is 0 */
ret->aic = NULL;
ret->cic_root.rb_node = NULL;
+ /* make sure set_task_ioprio() sees the settings above */
+ smp_wmb();
tsk->io_context = ret;
}
tsk->io_context = ret;
}