All of lore.kernel.org
 help / color / mirror / Atom feed
* (looking for) more info on parity creation
@ 2021-10-25 12:01 Marek
  2021-10-27 15:51 ` Wol
  0 siblings, 1 reply; 2+ messages in thread
From: Marek @ 2021-10-25 12:01 UTC (permalink / raw)
  To: Linux-RAID

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

Marek

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: (looking for) more info on parity creation
  2021-10-25 12:01 (looking for) more info on parity creation Marek
@ 2021-10-27 15:51 ` Wol
  0 siblings, 0 replies; 2+ messages in thread
From: Wol @ 2021-10-27 15:51 UTC (permalink / raw)
  To: Marek, Linux-RAID

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-27 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 12:01 (looking for) more info on parity creation Marek
2021-10-27 15:51 ` Wol

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.