linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Hill <robin@robinhill.me.uk>
To: linux-raid@vger.kernel.org
Subject: Re: when read error ,where do we rewrite?
Date: Fri, 8 Jan 2010 10:03:36 +0000	[thread overview]
Message-ID: <20100108100336.GA21358@cthulhu.home.robinhill.me.uk> (raw)
In-Reply-To: <6c394cc31001072059t2669afa8l5fed42ff77b3c134@mail.gmail.com>

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

On Fri Jan 08, 2010 at 12:59:26PM +0800, dong wu wrote:

> In the source code of raid5,when write error,it faulty the disk,not remap
> the block. why do it use "remap the block"?
> 
There's two separate error cases - read error and write error.

If the RAID layer gets a read error from the disk, it uses the parity to
recalculate the data and then writes it back to the disk.  If the disk
(internally) gets an error when writing this block, it should silently
mark it as faulty and map a spare block in to replace it, writing to
that instead,

If the RAID layer gets a write error from the disk, this indicates that
it's failed to do this remapping, so it marks the disk as faulty.

HTH,
    Robin
-- 
     ___        
    ( ' }     |       Robin Hill        <robin@robinhill.me.uk> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

      parent reply	other threads:[~2010-01-08 10:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07 12:41 when read error ,where do we rewrite? dong wu
2010-01-07 13:18 ` Robin Hill
2010-01-08  4:54   ` dong wu
2010-01-08  4:59     ` dong wu
2010-01-08  6:35       ` Michael Evans
2010-01-08 10:03       ` Robin Hill [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=20100108100336.GA21358@cthulhu.home.robinhill.me.uk \
    --to=robin@robinhill.me.uk \
    --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).