On Wed, Sep 2, 2020 at 5:00 AM Xiao Ni <xni@xxxxxxxxxx> wrote: > > 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. > Reported-by: kernel test robot <lkp@xxxxxxxxx> > > v6: > Move the codes that calculate discard start/size into specific raid type. > Remove discard support for reshape Sorry for the delay. I apply the set to md-next. Please keep testing and try to fix discard with reshape. I will also run tests. Thanks, Song