* [f2fs-dev] [PATCH v2 3/8] f2fs: drop usage of page_index [not found] <20240423170339.54131-1-ryncsn@gmail.com> @ 2024-04-23 17:03 ` Kairui Song 2024-04-23 22:58 ` Matthew Wilcox 0 siblings, 1 reply; 3+ messages in thread From: Kairui Song @ 2024-04-23 17:03 UTC (permalink / raw) To: linux-mm Cc: Kairui Song, Ryan Roberts, Chris Li, Neil Brown, David Hildenbrand, Hugh Dickins, linux-kernel, Matthew Wilcox, linux-f2fs-devel, Yosry Ahmed, Minchan Kim, Barry Song, Huang, Ying, linux-fsdevel, Jaegeuk Kim, Andrew Morton From: Kairui Song <kasong@tencent.com> page_index is needed for mixed usage of page cache and swap cache, for pure page cache usage, the caller can just use page->index instead. It can't be a swap cache page here, so just drop it. Signed-off-by: Kairui Song <kasong@tencent.com> Cc: Chao Yu <chao@kernel.org> Cc: Jaegeuk Kim <jaegeuk@kernel.org> Cc: linux-f2fs-devel@lists.sourceforge.net --- fs/f2fs/data.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index d9494b5fc7c1..12d5bbd18755 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2057,7 +2057,7 @@ static int f2fs_read_single_page(struct inode *inode, struct page *page, sector_t block_nr; int ret = 0; - block_in_file = (sector_t)page_index(page); + block_in_file = (sector_t)page->index; last_block = block_in_file + nr_pages; last_block_in_file = bytes_to_blks(inode, f2fs_readpage_limit(inode) + blocksize - 1); @@ -4086,8 +4086,7 @@ void f2fs_clear_page_cache_dirty_tag(struct page *page) unsigned long flags; xa_lock_irqsave(&mapping->i_pages, flags); - __xa_clear_mark(&mapping->i_pages, page_index(page), - PAGECACHE_TAG_DIRTY); + __xa_clear_mark(&mapping->i_pages, page->index, PAGECACHE_TAG_DIRTY); xa_unlock_irqrestore(&mapping->i_pages, flags); } -- 2.44.0 _______________________________________________ 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 v2 3/8] f2fs: drop usage of page_index 2024-04-23 17:03 ` [f2fs-dev] [PATCH v2 3/8] f2fs: drop usage of page_index Kairui Song @ 2024-04-23 22:58 ` Matthew Wilcox 2024-04-28 3:17 ` Chao Yu 0 siblings, 1 reply; 3+ messages in thread From: Matthew Wilcox @ 2024-04-23 22:58 UTC (permalink / raw) To: Kairui Song Cc: Ryan Roberts, Chris Li, Neil Brown, Minchan Kim, Hugh Dickins, linux-kernel, linux-f2fs-devel, Yosry Ahmed, linux-mm, Barry Song, Huang, Ying, linux-fsdevel, Jaegeuk Kim, Andrew Morton, David Hildenbrand On Wed, Apr 24, 2024 at 01:03:34AM +0800, Kairui Song wrote: > @@ -4086,8 +4086,7 @@ void f2fs_clear_page_cache_dirty_tag(struct page *page) > unsigned long flags; > > xa_lock_irqsave(&mapping->i_pages, flags); > - __xa_clear_mark(&mapping->i_pages, page_index(page), > - PAGECACHE_TAG_DIRTY); > + __xa_clear_mark(&mapping->i_pages, page->index, PAGECACHE_TAG_DIRTY); > xa_unlock_irqrestore(&mapping->i_pages, flags); > } I just sent a patch which is going to conflict with this: https://lore.kernel.org/linux-mm/20240423225552.4113447-3-willy@infradead.org/ Chao Yu, Jaegeuk Kim; what are your plans for converting f2fs to use folios? This is getting quite urgent. _______________________________________________ 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 v2 3/8] f2fs: drop usage of page_index 2024-04-23 22:58 ` Matthew Wilcox @ 2024-04-28 3:17 ` Chao Yu 0 siblings, 0 replies; 3+ messages in thread From: Chao Yu @ 2024-04-28 3:17 UTC (permalink / raw) To: Matthew Wilcox, Kairui Song Cc: Ryan Roberts, Chris Li, Neil Brown, Minchan Kim, Hugh Dickins, linux-kernel, linux-f2fs-devel, Yosry Ahmed, linux-mm, Barry Song, Huang, Ying, linux-fsdevel, Jaegeuk Kim, Andrew Morton, David Hildenbrand On 2024/4/24 6:58, Matthew Wilcox wrote: > On Wed, Apr 24, 2024 at 01:03:34AM +0800, Kairui Song wrote: >> @@ -4086,8 +4086,7 @@ void f2fs_clear_page_cache_dirty_tag(struct page *page) >> unsigned long flags; >> >> xa_lock_irqsave(&mapping->i_pages, flags); >> - __xa_clear_mark(&mapping->i_pages, page_index(page), >> - PAGECACHE_TAG_DIRTY); >> + __xa_clear_mark(&mapping->i_pages, page->index, PAGECACHE_TAG_DIRTY); >> xa_unlock_irqrestore(&mapping->i_pages, flags); >> } > > I just sent a patch which is going to conflict with this: > > https://lore.kernel.org/linux-mm/20240423225552.4113447-3-willy@infradead.org/ > > Chao Yu, Jaegeuk Kim; what are your plans for converting f2fs to use Hi Matthew, I've converted .read_folio and .readahead of f2fs to use folio w/ below patchset, and let me take a look how to support and enable large folio... https://lore.kernel.org/linux-f2fs-devel/20240422062417.2421616-1-chao@kernel.org/ Thanks, > folios? This is getting quite urgent. _______________________________________________ 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:[~2024-04-28 3:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240423170339.54131-1-ryncsn@gmail.com>
2024-04-23 17:03 ` [f2fs-dev] [PATCH v2 3/8] f2fs: drop usage of page_index Kairui Song
2024-04-23 22:58 ` Matthew Wilcox
2024-04-28 3:17 ` Chao Yu
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).