raid6_xor_syndrome(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ raid6_xor_syndrome(9) β€” Kernel API Manual ✨

πŸ’– NAME πŸ’–

raid6_xor_syndrome β€” update RAID6 P/Q parity. Like, that's the whole assignment, bestie. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

void raid6_xor_syndrome (int disks , int start , int stop , size_t bytes
       , void **ptrs );

πŸŽ€ ARGUMENTS πŸŽ€

  • disks β€” number of "disks" to operate on including parity. Yes, parity is included in the count, keep up. ✨
  • start β€” first index into disk to update.
  • stop β€” last index into disk to update.
  • bytes β€” length in bytes of each vector.
  • ptrs β€” disks size array of memory pointers.

πŸ’… DESCRIPTION πŸ’…

Okay so picture this: this function updates bytes worth of RAID6 P and Q parity in ptrs[disks - 2] and ptrs[disks - 1] respectively, for the memory pointed to by ptrs[start..stop]. Iconic. πŸ’–

It's used to update parity in place using the following sequence:

  1. call raid6_xor_syndrome(disk, start, stop, ...) for the existing data.
  2. update the data in ptrs[start..stop].
  3. call raid6_xor_syndrome(disk, start, stop, ...) for the new data.

Data between start and stop that is not changed should be filled with a pointer to the kernel zero page. That's important, bestie β€” don't leave it doing its own thing. 🫢

⚠️ Constraint check, fr fr: disks must be at least 4, and 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; stop must be larger or equal to start.

🌈 SEE ALSO 🌈

Kernel file ./lib/raid/raid6/algos.c, plus raid6_gen_syndrome(9), raid6_recov_2data(9), and raid6_recov_datap(9). Go read those if you're obsessed with parity like me. πŸ’œ

mwah πŸ’‹ β€” source/version: ./lib/raid/raid6; date: October 2026. Stay slaying, parity bestie πŸ’–

πŸ“¦ where this page comes from