Skip to content

RFC Introduce device state 'failed'

Anand Jain linux-btrfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 RFC Latest2 patches 11 repliesIn review
  2. v72 patches 0 repliesSuperseded

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: introduce device dynamic state transition to failedfs/btrfs/volumes.c fs/btrfs/volumes.h+118 -12 replies
2/2btrfs: check device for critical errors and mark failedfs/btrfs/ctree.h fs/btrfs/disk-io.c fs/btrfs/volumes.c +1 more+84 -19 replies
2/2btrfs: mark device failed for write and flush errorsfs/btrfs/volumes.h+5 -00 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchAustin S. Hemmelgarn
1/2T-b
2/2T-b
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 0/2] [RFC] Introduce device state 'failed'

When one device fails it has to be closed and marked as failed. Further it needs sysfs (or some) interface to provide complete information about the device and the volume status to the user land from the kernel. Next when the disappeared device reappears we need to resilver/insync depending on the RAID profile which should be handled per RAID profile specific.

The efforts here are to fix above three missing items.

To begin with this patch brings a Write/Flush failed device to a failed state.

Next about bringing the device back to the alloc list and verifying its consistency and kicking off the re-silvering part that still WIP, & feedback helps. For RAID1 a convert of single raid profile back to all raid1 will help. For RAID56 I am backing on Luibo's recent RAID56 write hole work I am yet to look deeper on that. Next for RAID1 there can be split brain scenario where each of the devices were mounted independently, so to fix this I planning to set an (new) incompatible flag if any of the device is written without the other. Now when they are brought together then incompatible flag should be their on only one of the device, however if incompatible flag is on both the devices then its a split brain scenario where user intervention will be required.

On the sysfs part there are patches in the ML which was sent before, I shall be reviving them as well.

Thanks, Anand

Anand Jain (2):
btrfs: introduce device dynamic state transition to failed
btrfs: check device for critical errors and mark failed

 fs/btrfs/ctree.h   |   2 +
 fs/btrfs/disk-io.c |  78 ++++++++++++++++++++++++++++++++++++++-
 fs/btrfs/volumes.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/volumes.h |  19 +++++++++-
 4 files changed, 202 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.0