Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f6f953aa99d456aff44ffdb1c77061d1a010eae2
Commit:     f6f953aa99d456aff44ffdb1c77061d1a010eae2
Parent:     14e713446aaca97dbe590fe845f7dcbd74ddbee2
Author:     Arne Redlich <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 31 00:37:57 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 15:39:38 2007 -0700

    md: handle writes to broken raid10 arrays gracefully
    
    When writing to a broken array, raid10 currently happily emits empty bio
    lists.  IOW, the master bio will never be completed, sending writers to
    UNINTERRUPTIBLE_SLEEP forever.
    
    Signed-off-by: Arne Redlich <[EMAIL PROTECTED]>
    Acked-by: Neil Brown <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/md/raid10.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 0c97bf4..4e53792 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -917,6 +917,13 @@ static int make_request(struct request_queue *q, struct 
bio * bio)
                bio_list_add(&bl, mbio);
        }
 
+       if (unlikely(!atomic_read(&r10_bio->remaining))) {
+               /* the array is dead */
+               md_write_end(mddev);
+               raid_end_bio_io(r10_bio);
+               return 0;
+       }
+
        bitmap_startwrite(mddev->bitmap, bio->bi_sector, r10_bio->sectors, 0);
        spin_lock_irqsave(&conf->device_lock, flags);
        bio_list_merge(&conf->pending_bio_list, &bl);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to