linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Bellon <mbellon@mvista.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: 2.4.25 MD RAID 1 driver - syncing hung due to I/O error
Date: Wed, 24 Mar 2004 09:09:28 -0700	[thread overview]
Message-ID: <4061B2B8.8030202@mvista.com> (raw)
In-Reply-To: <4060C4DD.2070506@mvista.com>

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

One of my disks has a bad block and hung while syncing (as the source of 
the sync) when it was read. A patch is attached for the fix.

The sync_request_done function is called after each sync I/O request 
completes regardless of the error outcome.
See end_sync_write and the "!sum_bhs" case a few lines above the patch 
location for references. If sync_request_done is not called the 
accounting is not updated and sooner or later things will hang. The 
R1BH_Uptodate not set case (read I/O error) does not do this and the 
problem occurs.

mark

[-- Attachment #2: raid1-patch-2 --]
[-- Type: text/plain, Size: 323 bytes --]

--- raid1.c.orig	2004-03-23 17:18:29.000000000 -0700
+++ raid1.c	2004-03-23 17:18:48.000000000 -0700
@@ -1251,6 +1251,7 @@
 				 */
 
 				printk (IO_ERROR, partition_name(bh->b_dev), bh->b_blocknr);
+				sync_request_done(bh->b_blocknr, conf);
 				md_done_sync(mddev, bh->b_size>>9, 0);
 				raid1_free_buf(r1_bh);
 			}

      reply	other threads:[~2004-03-24 16:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-23 23:14 2.4.25 MD RAID 1 driver - memory leak? Mark Bellon
2004-03-24 16:09 ` Mark Bellon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4061B2B8.8030202@mvista.com \
    --to=mbellon@mvista.com \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).