Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118957
b: refs/heads/master
c: 8a57dfc
h: refs/heads/master
i:
  118955: 86b4566
v: v3
  • Loading branch information
Chandra Seetharaman authored and Alasdair G Kergon committed Nov 13, 2008
1 parent e39ef20 commit 83be4ac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 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: d221d2e77696e70e94b13989ea15db2ba5b34f8e
refs/heads/master: 8a57dfc6f943c92b861c9a19b0c86ddcb2aba768
24 changes: 16 additions & 8 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -937,16 +937,24 @@ static void dm_unplug_all(struct request_queue *q)

static int dm_any_congested(void *congested_data, int bdi_bits)
{
int r;
struct mapped_device *md = (struct mapped_device *) congested_data;
struct dm_table *map = dm_get_table(md);
int r = bdi_bits;
struct mapped_device *md = congested_data;
struct dm_table *map;

if (!map || test_bit(DMF_BLOCK_IO, &md->flags))
r = bdi_bits;
else
r = dm_table_any_congested(map, bdi_bits);
atomic_inc(&md->pending);

if (!test_bit(DMF_BLOCK_IO, &md->flags)) {
map = dm_get_table(md);
if (map) {
r = dm_table_any_congested(map, bdi_bits);
dm_table_put(map);
}
}

if (!atomic_dec_return(&md->pending))
/* nudge anyone waiting on suspend queue */
wake_up(&md->wait);

dm_table_put(map);
return r;
}

Expand Down

0 comments on commit 83be4ac

Please sign in to comment.