All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wol <antlists@youngman.org.uk>
To: Marek <mlf.conv@gmail.com>, Linux-RAID <linux-raid@vger.kernel.org>
Subject: Re: (looking for) more info on parity creation
Date: Wed, 27 Oct 2021 16:51:42 +0100	[thread overview]
Message-ID: <a0f411bb-31b0-484c-b405-1e45590be761@youngman.org.uk> (raw)
In-Reply-To: <CA+sqOsZB7s76CVmOQw6jbG3L9q7FLJ_Lw85QEnYVn7RTr4RNxw@mail.gmail.com>

On 25/10/2021 13:01, Marek wrote:
> Hi all,
> 
> I'm looking for the piece of code inside mdadm source code that
> calculates parity can someone please point me to the part of source
> code which implements parity creation?
> Also is it just a simple XOR as described everywhere:
> eg double word disk1 XOR  double word disk2 XOR double word disk3 =
> double word disk 4
> or is something more complex going on.
> thanks
> 
Parity? Which parity? Yes something more complex is going on ...

I believe you are right with regards to raid-5, but with raid-6 that 
approach doesn't work, it has to be much more complex.

Also, if you're looking in mdadm, you're looking in the wrong place. 
There may be some code to do with parity there, but mdadm basically 
manages WHAT IS SUPPOSED TO HAPPEN.

The actual "make it happen" code is in the md-raid drivers in the kernel 
(not to be confused with the dm-raid code drivers, or the btrfs-raid 
drivers, etc etc).

If you go to the linux-raid website it will hopefully give you more 
information along the lines of what you want. Iirc there is a fairly 
detailed explanation of raid-6 linked to from there ...

https://raid.wiki.kernel.org/index.php/Linux_Raid

Cheers,
Wol

      reply	other threads:[~2021-10-27 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 12:01 (looking for) more info on parity creation Marek
2021-10-27 15:51 ` Wol [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=a0f411bb-31b0-484c-b405-1e45590be761@youngman.org.uk \
    --to=antlists@youngman.org.uk \
    --cc=linux-raid@vger.kernel.org \
    --cc=mlf.conv@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.