linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: hmsjwzb <hmsjwzb@zoho.com>
To: Qu Wenruo <wqu@suse.com>
Cc: stringbox8@zoho.com, Chris Mason <clm@fb.com>,
	Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs:remove redundant index_rbio_pages in raid56_rmw_stripe
Date: Thu, 29 Sep 2022 01:14:11 -0400	[thread overview]
Message-ID: <32c9fcf2-e1b4-8d31-a1f4-b07b1d5c1dc5@zoho.com> (raw)
In-Reply-To: <c4293742-06ba-8720-e2eb-d4d3bc4da044@suse.com>

Hi Qu,

I test this patch with fstests runs ?

Four btrfs cases failed.

	btrfs/219	btrfs/249	btrfs/253	btrfs/254

Thanks,
Flint

On 9/28/22 23:08, Qu Wenruo wrote:
> 
> 
> On 2022/9/29 09:44, Flint.Wang wrote:
>>    The index_rbio_pages in raid56_rmw_stripe is redundant.
> 
> index_rbio_pages() is to populate the rbio->bio_sectors array.
> 
> In raid56_rmw_stripe() we later calls sector_in_rbio(), which will check if a sector is belonging to bio_lists.
> 
> If not called, all sector will be returned using the sectors in rbio->bio_sectors, not using the sectors in bio lists.
> 
> Have you tried your patch with fstests runs?
> 
> IMHO it should fail a lot of very basic writes in RAID56.
> 
> Thanks,
> Qu
> 
>>    It is invoked in finish_rmw anyway.
>>
>> Signed-off-by: Flint.Wang <hmsjwzb@zoho.com>
>> ---
>>   fs/btrfs/raid56.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
>> index f6395e8288d69..44266b2c5b86e 100644
>> --- a/fs/btrfs/raid56.c
>> +++ b/fs/btrfs/raid56.c
>> @@ -1546,8 +1546,6 @@ static int raid56_rmw_stripe(struct btrfs_raid_bio *rbio)
>>       if (ret)
>>           goto cleanup;
>>   -    index_rbio_pages(rbio);
>> -
>>       atomic_set(&rbio->error, 0);
>>       /* Build a list of bios to read all the missing data sectors. */
>>       for (total_sector_nr = 0; total_sector_nr < nr_data_sectors;

      parent reply	other threads:[~2022-09-29  5:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29  1:44 [PATCH] btrfs:remove redundant index_rbio_pages in raid56_rmw_stripe Flint.Wang
2022-09-29  1:49 ` hmsjwzb
2022-09-29  3:08 ` Qu Wenruo
2022-09-29  3:13   ` Qu Wenruo
2022-09-29  6:41     ` hmsjwzb
2022-09-29  7:00       ` Qu Wenruo
2022-09-29  5:14   ` hmsjwzb [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32c9fcf2-e1b4-8d31-a1f4-b07b1d5c1dc5@zoho.com \
    --to=hmsjwzb@zoho.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stringbox8@zoho.com \
    --cc=wqu@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).