Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142892
b: refs/heads/master
c: 54d9a1b
h: refs/heads/master
v: v3
  • Loading branch information
Alasdair G Kergon committed Apr 8, 2009
1 parent f21766c commit 07263b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 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: 1eb787ec183d1267cac95aae632e92dee05ed50a
refs/heads/master: 54d9a1b4513b96cbd835ca6866c6a604d194b2ae
18 changes: 7 additions & 11 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,6 @@ static int dm_merge_bvec(struct request_queue *q,
*/
static int dm_request(struct request_queue *q, struct bio *bio)
{
int r = -EIO;
int rw = bio_data_dir(bio);
struct mapped_device *md = q->queuedata;
int cpu;
Expand Down Expand Up @@ -957,11 +956,14 @@ static int dm_request(struct request_queue *q, struct bio *bio)
while (test_bit(DMF_QUEUE_IO_TO_THREAD, &md->flags)) {
up_read(&md->io_lock);

if (bio_rw(bio) != READA)
r = queue_io(md, bio);
if (unlikely(test_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags)) &&
bio_rw(bio) == READA) {
bio_io_error(bio);
return 0;
}

if (r <= 0)
goto out_req;
if (!queue_io(md, bio))
return 0;

/*
* We're in a while loop, because someone could suspend
Expand All @@ -973,12 +975,6 @@ static int dm_request(struct request_queue *q, struct bio *bio)
__split_and_process_bio(md, bio);
up_read(&md->io_lock);
return 0;

out_req:
if (r < 0)
bio_io_error(bio);

return 0;
}

static void dm_unplug_all(struct request_queue *q)
Expand Down

0 comments on commit 07263b4

Please sign in to comment.