Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77607
b: refs/heads/master
c: 9e6e39f
h: refs/heads/master
i:
  77605: f620b98
  77603: 050994d
  77599: 31ea0d4
v: v3
  • Loading branch information
Kiyoshi Ueda authored and Jens Axboe committed Jan 28, 2008
1 parent a1deef8 commit 58fbad8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3b11313a6c2a42425bf06e92528bda6affd58dec
refs/heads/master: 9e6e39f2c478fff2e9d3430cdfe6730877942ed6
35 changes: 15 additions & 20 deletions trunk/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ unsigned blk_ordered_req_seq(struct request *rq)
void blk_ordered_complete_seq(struct request_queue *q, unsigned seq, int error)
{
struct request *rq;
int uptodate;

if (error && !q->orderr)
q->orderr = error;
Expand All @@ -361,15 +360,11 @@ void blk_ordered_complete_seq(struct request_queue *q, unsigned seq, int error)
/*
* Okay, sequence complete.
*/
uptodate = 1;
if (q->orderr)
uptodate = q->orderr;

q->ordseq = 0;
rq = q->orig_bar_rq;

end_that_request_first(rq, uptodate, rq->hard_nr_sectors);
end_that_request_last(rq, uptodate);
if (__blk_end_request(rq, q->orderr, blk_rq_bytes(rq)))
BUG();
}

static void pre_flush_end_io(struct request *rq, int error)
Expand Down Expand Up @@ -486,9 +481,9 @@ int blk_do_ordered(struct request_queue *q, struct request **rqp)
* ORDERED_NONE while this request is on it.
*/
blkdev_dequeue_request(rq);
end_that_request_first(rq, -EOPNOTSUPP,
rq->hard_nr_sectors);
end_that_request_last(rq, -EOPNOTSUPP);
if (__blk_end_request(rq, -EOPNOTSUPP,
blk_rq_bytes(rq)))
BUG();
*rqp = NULL;
return 0;
}
Expand Down Expand Up @@ -3713,14 +3708,14 @@ void end_that_request_last(struct request *req, int uptodate)
EXPORT_SYMBOL(end_that_request_last);

static inline void __end_request(struct request *rq, int uptodate,
unsigned int nr_bytes, int dequeue)
unsigned int nr_bytes)
{
if (!end_that_request_chunk(rq, uptodate, nr_bytes)) {
if (dequeue)
blkdev_dequeue_request(rq);
add_disk_randomness(rq->rq_disk);
end_that_request_last(rq, uptodate);
}
int error = 0;

if (uptodate <= 0)
error = uptodate ? uptodate : -EIO;

__blk_end_request(rq, error, nr_bytes);
}

/**
Expand Down Expand Up @@ -3763,7 +3758,7 @@ EXPORT_SYMBOL_GPL(blk_rq_cur_bytes);
**/
void end_queued_request(struct request *rq, int uptodate)
{
__end_request(rq, uptodate, blk_rq_bytes(rq), 1);
__end_request(rq, uptodate, blk_rq_bytes(rq));
}
EXPORT_SYMBOL(end_queued_request);

Expand All @@ -3780,7 +3775,7 @@ EXPORT_SYMBOL(end_queued_request);
**/
void end_dequeued_request(struct request *rq, int uptodate)
{
__end_request(rq, uptodate, blk_rq_bytes(rq), 0);
__end_request(rq, uptodate, blk_rq_bytes(rq));
}
EXPORT_SYMBOL(end_dequeued_request);

Expand All @@ -3806,7 +3801,7 @@ EXPORT_SYMBOL(end_dequeued_request);
**/
void end_request(struct request *req, int uptodate)
{
__end_request(req, uptodate, req->hard_cur_sectors << 9, 1);
__end_request(req, uptodate, req->hard_cur_sectors << 9);
}
EXPORT_SYMBOL(end_request);

Expand Down

0 comments on commit 58fbad8

Please sign in to comment.