Skip to content

don't change mempool if in-flight r1bio exists

Xueshi Hu linux-raid 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 20 repliesIn review
  2. v23 patches 3 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3md/raid1: freeze array more strictly when reshapedrivers/md/raid1.c+33 -24 replies
2/3md/raid1: don't allow_barrier() before r1bio got freeddrivers/md/raid1.c+9 -61 reply
3/3md/raid1: check array size before reshapedrivers/md/raid1.c+6 -315 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchYu Kuai
1/3
2/3R-b
3/3

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

Read the v3 thread

Cover letter [PATCH v3 0/3] don't change mempool if in-flight r1bio exists

All the r1bio should be freed before raid1_reshape() changes the mempool. However, freeze_array() doesn't guarantee there's no r1bio, as some r1bio maybe queued. Also, in raid1_write_request(), handle_read_error() and raid_end_bio_io() , kernel shall not allow_barrier() before the r1bio is properly handled.

-> v2:
- fix the problem one by one instead of calling blk_mq_freeze_queue() as suggested by Yu Kuai
-> v3:
- add freeze_array_totally() to replace freeze_array() instead of gave up in raid1_reshape()
- add a missed fix in raid_end_bio_io()
- add a small check at the start of raid1_reshape()

Xueshi Hu (3):
md/raid1: freeze array more strictly when reshape md/raid1: don't allow_barrier() before r1bio got freed md/raid1: check array size before reshape

 drivers/md/raid1.c | 59 +++++++++++++++++++++++++++++++++++++---------
 1 file changed, 48 insertions(+), 11 deletions(-)
Signature · 1 line
2.40.1