Skip to content

RFC Block/XFS: Support alternative mirror device retry

Bob Liu linux-block linux-fsdevel linux-xfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest3 patches 22 repliesIn review
  2. v2 RFC9 patches 18 repliesSuperseded

Changes in v3 from the cover letter

- Total new implementation, pass down verify function to block layer as suggested by Dave.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3block: introduce submit_bio_verify()block/blk-core.c include/linux/bio.h+12 -32 replies
2/3block: verify data when endioblock/bio-integrity.c block/bio.c block/blk-core.c +5 more+68 -020 replies
3/3fs: xfs: add read_verifier() functionfs/xfs/xfs_buf.c fs/xfs/xfs_buf.h+22 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [RFC PATCH v3 0/3] Block/XFS: Support alternative mirror device retry

Motivation:
When fs data/metadata checksum mismatch, lower block devices may have other correct copies. e.g. If XFS successfully reads a metadata buffer off a raid1 but decides that the metadata is garbage, today it will shut down the entire filesystem without trying any of the other mirrors. This is a severe loss of service, and we propose these patches to have XFS try harder to avoid failure.

This patch prototype this mirror retry idea by adding a function verifier callback to submit_bio. Filesystem can use submit_bio_verify() to pass a callback to the block layer which can then be used to verify if the data read is correct.

Reused some of bio-integrity code, can be separated if necessary.

Changes v3:
- Total new implementation, pass down verify function to block layer as suggested by Dave.

Bob Liu (3):
block: introduce submit_bio_verify()
block: verify data when endio
fs: xfs: add read_verifier() function

 block/bio-integrity.c     | 45 +++++++++++++++++++++++++++++++++++++++
 block/bio.c               |  3 +++
 block/blk-core.c          | 17 ++++++++++++---
 block/blk.h               |  8 +++++++
 block/bounce.c            |  1 +
 drivers/md/raid1.c        |  1 +
 drivers/md/raid5-ppl.c    |  1 +
 fs/xfs/xfs_buf.c          | 23 ++++++++++++++++++--
 fs/xfs/xfs_buf.h          |  1 +
 include/linux/bio.h       |  2 ++
 include/linux/blk_types.h |  5 +++++
 11 files changed, 102 insertions(+), 5 deletions(-)
Signature · 1 line
2.17.1