Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251243
b: refs/heads/master
c: 97961ef
h: refs/heads/master
i:
  251241: 9481f6b
  251239: 116e8e0
v: v3
  • Loading branch information
Konrad Rzeszutek Wilk committed Apr 26, 2011
1 parent 59cb996 commit e663e88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: 8b6bf747d70e5bac1a34c8fd773230e1cfdd7546
refs/heads/master: 97961ef46b9b5a6a7c918a38b898a7b3e49869f4
13 changes: 6 additions & 7 deletions trunk/drivers/block/xen-blkback/blkback.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ int xen_blkif_schedule(void *arg)
printk(KERN_DEBUG "%s: started\n", current->comm);

while (!kthread_should_stop()) {
struct blk_plug plug;

if (try_to_freeze())
continue;
if (unlikely(vbd->size != vbd_sz(vbd)))
Expand All @@ -292,9 +294,13 @@ int xen_blkif_schedule(void *arg)
blkif->waiting_reqs = 0;
smp_mb(); /* clear flag *before* checking for work */

blk_start_plug(&plug);

if (do_block_io_op(blkif))
blkif->waiting_reqs = 1;

blk_finish_plug(&plug);

if (log_stats && time_after(jiffies, blkif->st_print))
print_stats(blkif);
}
Expand Down Expand Up @@ -547,7 +553,6 @@ static void dispatch_rw_block_io(struct blkif_st *blkif,
struct bio *biolist[BLKIF_MAX_SEGMENTS_PER_REQUEST];
int i, nbio = 0;
int operation;
struct blk_plug plug;

switch (req->operation) {
case BLKIF_OP_READ:
Expand Down Expand Up @@ -660,15 +665,9 @@ static void dispatch_rw_block_io(struct blkif_st *blkif,
*/
atomic_set(&pending_req->pendcnt, nbio);

/* Get a reference count for the disk queue and start sending I/O */
blk_start_plug(&plug);

for (i = 0; i < nbio; i++)
submit_bio(operation, biolist[i]);

blk_finish_plug(&plug);
/* Let the I/Os go.. */

if (operation == READ)
blkif->st_rd_sect += preq.nr_sects;
else if (operation == WRITE || operation == WRITE_BARRIER)
Expand Down

0 comments on commit e663e88

Please sign in to comment.