public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: migrate extent_buffer::pages[] to folio
Date: Fri, 1 Dec 2023 10:03:56 +1030	[thread overview]
Message-ID: <5cababa8-3690-407e-b008-1d65e73dea29@gmx.com> (raw)
In-Reply-To: <20231130231852.GW18929@twin.jikos.cz>



On 2023/12/1 09:48, David Sterba wrote:
> On Mon, Nov 27, 2023 at 08:48:45AM +1030, Qu Wenruo wrote:
>>   		return;
>>   	}
>>
>> -	kaddr = page_address(buf->pages[0]) + offset_in_page(buf->start);
>> +	kaddr = folio_address(buf->folios[0]) + offset_in_page(buf->start);
>>   	crypto_shash_update(shash, kaddr + BTRFS_CSUM_SIZE,
>>   			    first_page_part - BTRFS_CSUM_SIZE);
>>
>> -	for (i = 1; i < num_pages && INLINE_EXTENT_BUFFER_PAGES > 1; i++) {
>> -		kaddr = page_address(buf->pages[i]);
>> -		crypto_shash_update(shash, kaddr, PAGE_SIZE);
>> -	}
>> +	for (i = 1; i < num_pages && INLINE_EXTENT_BUFFER_PAGES > 1; i++)
>> +		crypto_shash_update(shash, folio_address(buf->folios[i]),
>> +				    PAGE_SIZE);
>
> This still says PAGE_SIZE while it's folios, so for now we have the same
> order for both, right? After full conversion we'll need folio_size().

Exactly.

There are other things to consider like converting to the number of
folios other than num_pages.

Thanks,
Qu
>

  reply	other threads:[~2023-11-30 23:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-26 22:18 [PATCH] btrfs: migrate extent_buffer::pages[] to folio Qu Wenruo
2023-11-27 16:32 ` Josef Bacik
2023-11-27 22:17   ` Qu Wenruo
2023-11-29 16:02     ` David Sterba
2023-11-30  6:56       ` Qu Wenruo
2023-11-30 12:19         ` Neal Gompa
2023-11-30 21:04           ` Qu Wenruo
2023-11-30 23:18 ` David Sterba
2023-11-30 23:33   ` Qu Wenruo [this message]
2023-11-30 23:22 ` David Sterba

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=5cababa8-3690-407e-b008-1d65e73dea29@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --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