raid1_error(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… raid1_error πŸ’…

ok so this is raid1_error, the RAID1 error handler, from the Kernel API Manual β€” yes bestie, we're reading kernel docs for fun now, this is who we are πŸŽ€


✨ SYNOPSIS ✨

void raid1_error (struct mddev *mddev , struct md_rdev *rdev );

like, that's the whole vibe. void return, two args, no notes πŸ’…


🫢 ARGUMENTS 🫢

  • mddev β€” the affected md device. this is the one going through it rn 😭
  • rdev β€” the member device that needs to be failed. yeah. we're failing it. it's giving "you're cut from the group chat" energy.

πŸ”₯ DESCRIPTION πŸ”₯

okay so what this routine does is it acknowledges the rdev failure and then figures out the new mddev state. like it's the friend who calmly goes "okay. okay. here's what we're gonna do." 🧚

so if it failed, then:

  • the MD_BROKEN flag gets set in mddev->flags. that's the big one, the main character flag πŸ‘‘
  • recovery is disabled. no more healing arc, it's over πŸ’€

otherwise β€” like, if it didn't fail β€” it must be degraded, and then:

  • recovery gets interrupted. sorry girl, we're stopping mid-way πŸ›‘
  • mddev->degraded gets bumped. one more L on the counter πŸ“ˆ

and then rdev gets marked as Faulty β€” with one exception bestie, listen: that does not happen in the case where the array is failed and MD_FAILLAST_DEV is not set. iykyk, those are the exact conditions, don't come for me 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/md/raid1.c β€” go read the source, it's literally right there, slay πŸ’œ


and that's the page!! this came from ./drivers/md, dated October 2026 β€” so yeah, future vibes, we stay ahead of the timeline βœ¨πŸ‘‘πŸ’–

πŸ“¦ where this page comes from