Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123291
b: refs/heads/master
c: a185eb4
h: refs/heads/master
i:
  123289: 2fdb69d
  123287: 43b5b18
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Dec 29, 2008
1 parent c4d2a3e commit 1f97be2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 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: 58eea927d2de43dc6f03d1ba2c46e55854b31540
refs/heads/master: a185eb4bc84155fff35b602ce99602c010de9634
14 changes: 13 additions & 1 deletion trunk/block/blk-barrier.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,21 @@ static inline bool start_ordered(struct request_queue *q, struct request **rqp)
* For an empty barrier, there's no actual BAR request, which
* in turn makes POSTFLUSH unnecessary. Mask them off.
*/
if (!rq->hard_nr_sectors)
if (!rq->hard_nr_sectors) {
q->ordered &= ~(QUEUE_ORDERED_DO_BAR |
QUEUE_ORDERED_DO_POSTFLUSH);
/*
* Empty barrier on a write-through device w/ ordered
* tag has no command to issue and without any command
* to issue, ordering by tag can't be used. Drain
* instead.
*/
if ((q->ordered & QUEUE_ORDERED_BY_TAG) &&
!(q->ordered & QUEUE_ORDERED_DO_PREFLUSH)) {
q->ordered &= ~QUEUE_ORDERED_BY_TAG;
q->ordered |= QUEUE_ORDERED_BY_DRAIN;
}
}

/* stash away the original request */
elv_dequeue_request(q, rq);
Expand Down

0 comments on commit 1f97be2

Please sign in to comment.