[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW5Fs9Zz+-2ZEZQe3g5jen4SiHNf7sRtYCN0w4TBGZ1Vsw@mail.gmail.com>
Date: Sun, 27 Dec 2020 13:57:12 -0800
From: Song Liu <song@...nel.org>
To: Xiao Ni <xni@...hat.com>
Cc: Song Liu <songliubraving@...com>,
Matthew Ruffell <matthew.ruffell@...onical.com>,
linux-raid <linux-raid@...r.kernel.org>,
lkml <linux-kernel@...r.kernel.org>, Coly Li <colyli@...e.de>,
Guoqing Jiang <guoqing.jiang@...ud.ionos.com>,
"khalid.elmously@...onical.com" <khalid.elmously@...onical.com>,
Jay Vosburgh <jay.vosburgh@...onical.com>
Subject: Re: PROBLEM: Recent raid10 block discard patchset causes filesystem
corruption on fstrim
Hi Xiao,
On Thu, Dec 24, 2020 at 2:18 AM Xiao Ni <xni@...hat.com> wrote:
>
>
>
[...]
>
> [ 789.709501] discard bio start : 70968, size : 191176
> [ 789.709507] first stripe index 69, start disk index 0, start disk
> offset 70968
> [ 789.709509] last stripe index 256, end disk index 0, end disk offset
> 262144
> [ 789.709511] disk 0, dev start : 70968, dev end : 262144
> [ 789.709515] disk 1, dev start : 70656, dev end : 262144
>
> For example, in this test case, it has 2 near copies. The
> start_disk_offset for the first disk is 70968.
> It should use the same offset address for second disk. But it uses the
> start address of this chunk.
> It discard more region. The patch in the attachment can fix this
> problem. It split the region that
> doesn't align with chunk size.
>
> There is another problem. The stripe size should be calculated
> differently for near layout and far layout.
>
> @Song, do you want me to use a separate patch for this fix, or fix this
> in the original patch?
Please fold in the changes in the original patches and resend the whole
set.
Thanks,
Song
>
> Merry Christmas
> Xiao
>
Powered by blists - more mailing lists