mbox series

[v2,0/3] md/raid1: don't change mempool if in-flight r1bio exists

Message ID 20230709102956.1716708-1-hubachelar@gmail.com (mailing list archive)
Headers show
Series md/raid1: don't change mempool if in-flight r1bio exists | expand

Message

Xueshi Hu July 9, 2023, 10:29 a.m. UTC
From: Xueshi Hu <xueshi.hu@smartx.com>

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() and
handle_read_error(), kernel shall not allow_barrier() before the r1bio is
properly handled.

Changes in v2:
	- fix the problem one by one instead of calling
	blk_mq_freeze_queue() as suggested by Yu Kuai

Xueshi Hu (3):
  md/raid1: gave up reshape in case there's queued io
  md/raid1: free old r1bio before retry write
  md/raid1: keep holding the barrier in handle_read_error()

 drivers/md/raid1.c | 36 +++++++++++++++++++++---------------
 1 file changed, 21 insertions(+), 15 deletions(-)