Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213184
b: refs/heads/master
c: 47f70d5
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Sep 10, 2010
1 parent ed0faa2 commit 4b7b761
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 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: 337238be1bf52e1242f940fc6fe83fb395e55057
refs/heads/master: 47f70d5a6ca78c40a1c799d43506efbfed914f7b
22 changes: 19 additions & 3 deletions trunk/block/blk-flush.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,38 @@ static struct request *blk_flush_complete_seq(struct request_queue *q,
return next_rq;
}

static void blk_flush_complete_seq_end_io(struct request_queue *q,
unsigned seq, int error)
{
bool was_empty = elv_queue_empty(q);
struct request *next_rq;

next_rq = blk_flush_complete_seq(q, seq, error);

/*
* Moving a request silently to empty queue_head may stall the
* queue. Kick the queue in those cases.
*/
if (was_empty && next_rq)
__blk_run_queue(q);
}

static void pre_flush_end_io(struct request *rq, int error)
{
elv_completed_request(rq->q, rq);
blk_flush_complete_seq(rq->q, QUEUE_FSEQ_PREFLUSH, error);
blk_flush_complete_seq_end_io(rq->q, QUEUE_FSEQ_PREFLUSH, error);
}

static void flush_data_end_io(struct request *rq, int error)
{
elv_completed_request(rq->q, rq);
blk_flush_complete_seq(rq->q, QUEUE_FSEQ_DATA, error);
blk_flush_complete_seq_end_io(rq->q, QUEUE_FSEQ_DATA, error);
}

static void post_flush_end_io(struct request *rq, int error)
{
elv_completed_request(rq->q, rq);
blk_flush_complete_seq(rq->q, QUEUE_FSEQ_POSTFLUSH, error);
blk_flush_complete_seq_end_io(rq->q, QUEUE_FSEQ_POSTFLUSH, error);
}

static void init_flush_request(struct request *rq, struct gendisk *disk)
Expand Down

0 comments on commit 4b7b761

Please sign in to comment.