Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140182
b: refs/heads/master
c: ef20858
h: refs/heads/master
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Apr 2, 2009
1 parent b8489dc commit 7d211c1
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: f0b9a4502baa18f8a255a2866bb4e0655fb35974
refs/heads/master: ef2085870ea448b3c19160d899cf4f948da6a384
18 changes: 7 additions & 11 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1401,14 +1401,20 @@ static int dm_wait_for_completion(struct mapped_device *md)
/*
* Process the deferred bios
*/
static void __flush_deferred_io(struct mapped_device *md)
static void dm_wq_work(struct work_struct *work)
{
struct mapped_device *md = container_of(work, struct mapped_device,
work);
struct bio *c;

down_write(&md->io_lock);

while ((c = bio_list_pop(&md->deferred)))
__split_and_process_bio(md, c);

clear_bit(DMF_BLOCK_IO, &md->flags);

up_write(&md->io_lock);
}

static void __merge_pushback_list(struct mapped_device *md)
Expand All @@ -1422,16 +1428,6 @@ static void __merge_pushback_list(struct mapped_device *md)
spin_unlock_irqrestore(&md->pushback_lock, flags);
}

static void dm_wq_work(struct work_struct *work)
{
struct mapped_device *md = container_of(work, struct mapped_device,
work);

down_write(&md->io_lock);
__flush_deferred_io(md);
up_write(&md->io_lock);
}

static void dm_queue_flush(struct mapped_device *md)
{
queue_work(md->wq, &md->work);
Expand Down

0 comments on commit 7d211c1

Please sign in to comment.