Skip to content

md/raid10: Improve handling raid10 discard request

Xiao Ni linux-raid 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 2 repliesIn review
  2. v55 patches 10 repliesSuperseded
  3. v4 posting 2/25 patches 2 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v4 posting 1/20 of 4 patches0 repliesSuperseded
v3 posting 2/24 patches8 repliesSuperseded
v3 posting 1/24 patches1 replySuperseded
v23 patches4 repliesSuperseded
v13 patches8 repliesSuperseded

Changes in v6 from the cover letter

Move the codes that calculate discard start/size into specific raid type. Remove discard support for reshape

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3md: calculate discard start address and size in specific raid typedrivers/md/md.c drivers/md/md.h drivers/md/raid0.c+7 -100 replies
2/3md/raid10: improve raid10 discard requestdrivers/md/raid10.c+255 -10 replies
3/3md/raid10: improve discard request for far layoutdrivers/md/raid10.c drivers/md/raid10.h+64 -230 replies

Reviews trailers per patch

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

PatchColy LiGuoqing Jiang
1/3
2/3R-b R-b
3/3

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

Read the v6 thread

Cover letter [PATCH V6 0/3] md/raid10: Improve handling raid10 discard request

Hi all

Now mkfs on raid10 which is combined with ssd/nvme disks takes a long time. This patch set tries to resolve this problem.

v1:
Coly helps to review these patches and give some suggestions:
One bug is found. If discard bio is across one stripe but bio size is bigger than one stripe size. After spliting, the bio will be NULL. In this version, it checks whether discard bio size is bigger than (2*stripe_size).
In raid10_end_discard_request, it's better to check R10BIO_Uptodate is set or not. It can avoid write memory to improve performance. Add more comments for calculating addresses.

v2:
Fix error by checkpatch.pl
Fix one bug for offset layout. v1 calculates wrongly split size Add more comments to explain how the discard range of each component disk is decided.

v3:
add support for far layout
Change the patch name

v4:
Pull codes that wait for blocked device into a seprate function It can't use (stripe_size-1) as a mask to calculate. (stripe_size-1) may not be power of 2.
It doesn't need to use a full copy of geo.
Fix warning by checkpatch.pl

v5:
In 32bit platform, it doesn't support 64bit devide by 32bit value.

v6:
Move the codes that calculate discard start/size into specific raid type. Remove discard support for reshape

Xiao Ni (3):
md: calculate discard start address and size in specific raid type md/raid10: improve raid10 discard request
md/raid10: improve discard request for far layout

 drivers/md/md.c     |   9 +-
 drivers/md/md.h     |   3 +-
 drivers/md/raid0.c  |   5 +-
 drivers/md/raid10.c | 296 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 drivers/md/raid10.h |   1 +
 5 files changed, 303 insertions(+), 11 deletions(-)
Signature · 1 line
2.7.5