raid6_gen_syndrome(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to raid6_gen_syndrome(9) β€” yes, the RAID6 parity generator page. it’s giving kernel math but make it cute. πŸ’– no cap, this one is lowkey iconic.

πŸŽ€ NAME πŸŽ€

raid6_gen_syndrome β€” generate RAID6 P/Q parity. that’s the whole vibe, fr fr.

✨ SYNOPSIS ✨

void raid6_gen_syndrome (int disks , size_t bytes , void **ptrs );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • disks β€” number of β€œdisks” to operate on, and yes, that count includes the parity disks. inclusive queen behavior. πŸ‘‘
  • bytes β€” length in bytes of each vector.
  • ptrs β€” a disks size array of memory pointers. literally the address book for your disks. 🫢

πŸ’– DESCRIPTION πŸ’–

so what it does: it generates bytes worth of RAID6 P and Q parity in ptrs[disks - 2] and ptrs[disks - 1] respectively, starting from the memory pointed to by ptrs[0] to ptrs[disks - 3]. main character parity generation, honestly. ✨

now the rules, bestie β€” do not skip these:

  • disks must be at least 4.
  • the memory pointed to by each member of ptrs must be at least 64-byte aligned.
  • bytes must be non-zero and a multiple of 512.
okay but like actually respect those constraints, because this is kernel math and the vibe check is strict. πŸ’…

the underlying algorithm lives here: https://kernel.org/pub/linux/kernel/people/hpa/raid6.pdf β€” go read the lore if you want the full picture. πŸ“–πŸŒΈ

🌈 SEE ALSO 🌈

Kernel file ./lib/raid/raid6/algos.c, raid6_xor_syndrome(9), raid6_recov_2data(9), raid6_recov_datap(9). the whole squad, iykyk. πŸ¦‹


mwah πŸ’‹ β€” this page comes from ./lib/raid/raid6, dated October 2026, and it’s raid6_gen_syndrome(9). bye bestie, go generate some parity responsibly πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from