* [f2fs-dev] [PATCH] f2fs: use folio_nr_pages() instead of shift operation
@ 2025-10-04 3:12 Pedro Demarchi Gomes
2025-10-09 3:23 ` Chao Yu via Linux-f2fs-devel
2025-10-16 18:24 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
0 siblings, 2 replies; 3+ messages in thread
From: Pedro Demarchi Gomes @ 2025-10-04 3:12 UTC (permalink / raw)
To: Chao Yu, Jaegeuk Kim; +Cc: linux-kernel, Pedro Demarchi Gomes, linux-f2fs-devel
folio_nr_pages() is a faster helper function to get the number of pages when
NR_PAGES_IN_LARGE_FOLIO is enabled.
Signed-off-by: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
---
fs/f2fs/f2fs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 46be7560548c..4467a6e7471c 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -2036,7 +2036,7 @@ static inline struct f2fs_super_block *F2FS_RAW_SUPER(struct f2fs_sb_info *sbi)
static inline struct f2fs_super_block *F2FS_SUPER_BLOCK(struct folio *folio,
pgoff_t index)
{
- pgoff_t idx_in_folio = index % (1 << folio_order(folio));
+ pgoff_t idx_in_folio = index % folio_nr_pages(folio);
return (struct f2fs_super_block *)
(page_address(folio_page(folio, idx_in_folio)) +
--
2.39.5
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [f2fs-dev] [PATCH] f2fs: use folio_nr_pages() instead of shift operation
2025-10-04 3:12 [f2fs-dev] [PATCH] f2fs: use folio_nr_pages() instead of shift operation Pedro Demarchi Gomes
@ 2025-10-09 3:23 ` Chao Yu via Linux-f2fs-devel
2025-10-16 18:24 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2025-10-09 3:23 UTC (permalink / raw)
To: Pedro Demarchi Gomes, Jaegeuk Kim; +Cc: linux-kernel, linux-f2fs-devel
On 10/4/2025 11:12 AM, Pedro Demarchi Gomes wrote:
> folio_nr_pages() is a faster helper function to get the number of pages when
> NR_PAGES_IN_LARGE_FOLIO is enabled.
>
> Signed-off-by: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: use folio_nr_pages() instead of shift operation
2025-10-04 3:12 [f2fs-dev] [PATCH] f2fs: use folio_nr_pages() instead of shift operation Pedro Demarchi Gomes
2025-10-09 3:23 ` Chao Yu via Linux-f2fs-devel
@ 2025-10-16 18:24 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+f2fs--- via Linux-f2fs-devel @ 2025-10-16 18:24 UTC (permalink / raw)
To: Pedro Demarchi Gomes; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Sat, 4 Oct 2025 00:12:17 -0300 you wrote:
> folio_nr_pages() is a faster helper function to get the number of pages when
> NR_PAGES_IN_LARGE_FOLIO is enabled.
>
> Signed-off-by: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
> ---
> fs/f2fs/f2fs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [f2fs-dev] f2fs: use folio_nr_pages() instead of shift operation
https://git.kernel.org/jaegeuk/f2fs/c/c9cd50d5aaf8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-16 18:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-04 3:12 [f2fs-dev] [PATCH] f2fs: use folio_nr_pages() instead of shift operation Pedro Demarchi Gomes
2025-10-09 3:23 ` Chao Yu via Linux-f2fs-devel
2025-10-16 18:24 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
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).