Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14627
b: refs/heads/master
c: 640eb3b
h: refs/heads/master
i:
  14625: d612b35
  14623: 80d473d
v: v3
  • Loading branch information
Stefan Bader authored and Linus Torvalds committed Nov 22, 2005
1 parent 9835a24 commit 1e66a88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 0e56822d30184d0da35a6ecc51f38c4ceb457a80
refs/heads/master: 640eb3b0456f8273726d31160aa24568ae703eec
13 changes: 7 additions & 6 deletions trunk/drivers/md/dm-mpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,7 @@ static int do_end_io(struct multipath *m, struct bio *bio,
{
struct hw_handler *hwh = &m->hw_handler;
unsigned err_flags = MP_FAIL_PATH; /* Default behavior */
unsigned long flags;

if (!error)
return 0; /* I/O complete */
Expand All @@ -1010,17 +1011,17 @@ static int do_end_io(struct multipath *m, struct bio *bio,
if (error == -EOPNOTSUPP)
return error;

spin_lock(&m->lock);
spin_lock_irqsave(&m->lock, flags);
if (!m->nr_valid_paths) {
if (!m->queue_if_no_path) {
spin_unlock(&m->lock);
spin_unlock_irqrestore(&m->lock, flags);
return -EIO;
} else {
spin_unlock(&m->lock);
spin_unlock_irqrestore(&m->lock, flags);
goto requeue;
}
}
spin_unlock(&m->lock);
spin_unlock_irqrestore(&m->lock, flags);

if (hwh->type && hwh->type->error)
err_flags = hwh->type->error(hwh, bio);
Expand All @@ -1040,12 +1041,12 @@ static int do_end_io(struct multipath *m, struct bio *bio,
dm_bio_restore(&mpio->details, bio);

/* queue for the daemon to resubmit or fail */
spin_lock(&m->lock);
spin_lock_irqsave(&m->lock, flags);
bio_list_add(&m->queued_ios, bio);
m->queue_size++;
if (!m->queue_io)
queue_work(kmultipathd, &m->process_queued_ios);
spin_unlock(&m->lock);
spin_unlock_irqrestore(&m->lock, flags);

return 1; /* io not complete */
}
Expand Down

0 comments on commit 1e66a88

Please sign in to comment.