* [f2fs-dev] [PATCH 1/2] f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio
@ 2023-04-10 2:24 Chao Yu
2023-04-10 2:24 ` [f2fs-dev] [PATCH 2/2] f2fs: clean up with {attach, detach}_page_private() Chao Yu
2023-04-10 18:33 ` [f2fs-dev] [PATCH 1/2] f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio Jaegeuk Kim
0 siblings, 2 replies; 8+ messages in thread
From: Chao Yu @ 2023-04-10 2:24 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel
We have maintain PagePrivate and page_private and page reference
w/ {set,clear}_page_private_*, it doesn't need to call
folio_detach_private() in the end of .invalidate_folio and
.release_folio, remove it and use f2fs_bug_on instead.
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/data.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 4946df6dd253..8b179b4bdc03 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -3737,7 +3737,8 @@ void f2fs_invalidate_folio(struct folio *folio, size_t offset, size_t length)
inode->i_ino == F2FS_COMPRESS_INO(sbi))
clear_page_private_data(&folio->page);
- folio_detach_private(folio);
+ f2fs_bug_on(sbi, PagePrivate(&folio->page));
+ f2fs_bug_on(sbi, page_private(&folio->page));
}
bool f2fs_release_folio(struct folio *folio, gfp_t wait)
@@ -3759,7 +3760,9 @@ bool f2fs_release_folio(struct folio *folio, gfp_t wait)
clear_page_private_reference(&folio->page);
clear_page_private_gcing(&folio->page);
- folio_detach_private(folio);
+ f2fs_bug_on(sbi, PagePrivate(&folio->page));
+ f2fs_bug_on(sbi, page_private(&folio->page));
+
return true;
}
--
2.25.1
_______________________________________________
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] 8+ messages in thread* [f2fs-dev] [PATCH 2/2] f2fs: clean up with {attach, detach}_page_private() 2023-04-10 2:24 [f2fs-dev] [PATCH 1/2] f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio Chao Yu @ 2023-04-10 2:24 ` Chao Yu 2023-04-10 18:47 ` Jaegeuk Kim 2023-04-10 18:33 ` [f2fs-dev] [PATCH 1/2] f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio Jaegeuk Kim 1 sibling, 1 reply; 8+ messages in thread From: Chao Yu @ 2023-04-10 2:24 UTC (permalink / raw) To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel No logic changes. Signed-off-by: Chao Yu <chao@kernel.org> --- fs/f2fs/f2fs.h | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index ec8387da7f74..c378aedcadea 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1416,11 +1416,8 @@ static inline bool page_private_##name(struct page *page) \ #define PAGE_PRIVATE_SET_FUNC(name, flagname) \ static inline void set_page_private_##name(struct page *page) \ { \ - if (!PagePrivate(page)) { \ - get_page(page); \ - SetPagePrivate(page); \ - set_page_private(page, 0); \ - } \ + if (!PagePrivate(page)) \ + attach_page_private(page, (void *)page->private); \ set_bit(PAGE_PRIVATE_NOT_POINTER, &page_private(page)); \ set_bit(PAGE_PRIVATE_##flagname, &page_private(page)); \ } @@ -1429,13 +1426,8 @@ static inline void set_page_private_##name(struct page *page) \ static inline void clear_page_private_##name(struct page *page) \ { \ clear_bit(PAGE_PRIVATE_##flagname, &page_private(page)); \ - if (page_private(page) == BIT(PAGE_PRIVATE_NOT_POINTER)) { \ - set_page_private(page, 0); \ - if (PagePrivate(page)) { \ - ClearPagePrivate(page); \ - put_page(page); \ - }\ - } \ + if (page_private(page) == BIT(PAGE_PRIVATE_NOT_POINTER)) \ + detach_page_private(page); \ } PAGE_PRIVATE_GET_FUNC(nonpointer, NOT_POINTER); @@ -1464,11 +1456,8 @@ static inline unsigned long get_page_private_data(struct page *page) static inline void set_page_private_data(struct page *page, unsigned long data) { - if (!PagePrivate(page)) { - get_page(page); - SetPagePrivate(page); - set_page_private(page, 0); - } + if (!PagePrivate(page)) + attach_page_private(page, 0); set_bit(PAGE_PRIVATE_NOT_POINTER, &page_private(page)); page_private(page) |= data << PAGE_PRIVATE_MAX; } @@ -1476,13 +1465,8 @@ static inline void set_page_private_data(struct page *page, unsigned long data) static inline void clear_page_private_data(struct page *page) { page_private(page) &= GENMASK(PAGE_PRIVATE_MAX - 1, 0); - if (page_private(page) == BIT(PAGE_PRIVATE_NOT_POINTER)) { - set_page_private(page, 0); - if (PagePrivate(page)) { - ClearPagePrivate(page); - put_page(page); - } - } + if (page_private(page) == BIT(PAGE_PRIVATE_NOT_POINTER)) + detach_page_private(page); } /* For compression */ -- 2.25.1 _______________________________________________ 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] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 2/2] f2fs: clean up with {attach, detach}_page_private() 2023-04-10 2:24 ` [f2fs-dev] [PATCH 2/2] f2fs: clean up with {attach, detach}_page_private() Chao Yu @ 2023-04-10 18:47 ` Jaegeuk Kim 2023-04-11 8:37 ` Chao Yu 0 siblings, 1 reply; 8+ messages in thread From: Jaegeuk Kim @ 2023-04-10 18:47 UTC (permalink / raw) To: Chao Yu; +Cc: linux-kernel, linux-f2fs-devel On 04/10, Chao Yu wrote: > No logic changes. > > Signed-off-by: Chao Yu <chao@kernel.org> > --- > fs/f2fs/f2fs.h | 32 ++++++++------------------------ > 1 file changed, 8 insertions(+), 24 deletions(-) > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > index ec8387da7f74..c378aedcadea 100644 > --- a/fs/f2fs/f2fs.h > +++ b/fs/f2fs/f2fs.h > @@ -1416,11 +1416,8 @@ static inline bool page_private_##name(struct page *page) \ > #define PAGE_PRIVATE_SET_FUNC(name, flagname) \ > static inline void set_page_private_##name(struct page *page) \ > { \ > - if (!PagePrivate(page)) { \ > - get_page(page); \ > - SetPagePrivate(page); \ > - set_page_private(page, 0); \ > - } \ > + if (!PagePrivate(page)) \ > + attach_page_private(page, (void *)page->private); \ attach_page_private(page, (void *)0); > set_bit(PAGE_PRIVATE_NOT_POINTER, &page_private(page)); \ > set_bit(PAGE_PRIVATE_##flagname, &page_private(page)); \ > } > @@ -1429,13 +1426,8 @@ static inline void set_page_private_##name(struct page *page) \ > static inline void clear_page_private_##name(struct page *page) \ > { \ > clear_bit(PAGE_PRIVATE_##flagname, &page_private(page)); \ > - if (page_private(page) == BIT(PAGE_PRIVATE_NOT_POINTER)) { \ > - set_page_private(page, 0); \ > - if (PagePrivate(page)) { \ > - ClearPagePrivate(page); \ > - put_page(page); \ > - }\ > - } \ > + if (page_private(page) == BIT(PAGE_PRIVATE_NOT_POINTER)) \ > + detach_page_private(page); \ > } > > PAGE_PRIVATE_GET_FUNC(nonpointer, NOT_POINTER); > @@ -1464,11 +1456,8 @@ static inline unsigned long get_page_private_data(struct page *page) > > static inline void set_page_private_data(struct page *page, unsigned long data) > { > - if (!PagePrivate(page)) { > - get_page(page); > - SetPagePrivate(page); > - set_page_private(page, 0); > - } > + if (!PagePrivate(page)) > + attach_page_private(page, 0); > set_bit(PAGE_PRIVATE_NOT_POINTER, &page_private(page)); > page_private(page) |= data << PAGE_PRIVATE_MAX; > } > @@ -1476,13 +1465,8 @@ static inline void set_page_private_data(struct page *page, unsigned long data) > static inline void clear_page_private_data(struct page *page) > { > page_private(page) &= GENMASK(PAGE_PRIVATE_MAX - 1, 0); > - if (page_private(page) == BIT(PAGE_PRIVATE_NOT_POINTER)) { > - set_page_private(page, 0); > - if (PagePrivate(page)) { > - ClearPagePrivate(page); > - put_page(page); > - } > - } > + if (page_private(page) == BIT(PAGE_PRIVATE_NOT_POINTER)) > + detach_page_private(page); > } > > /* For compression */ > -- > 2.25.1 _______________________________________________ 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] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 2/2] f2fs: clean up with {attach, detach}_page_private() 2023-04-10 18:47 ` Jaegeuk Kim @ 2023-04-11 8:37 ` Chao Yu 0 siblings, 0 replies; 8+ messages in thread From: Chao Yu @ 2023-04-11 8:37 UTC (permalink / raw) To: Jaegeuk Kim; +Cc: linux-kernel, linux-f2fs-devel On 2023/4/11 2:47, Jaegeuk Kim wrote: > On 04/10, Chao Yu wrote: >> No logic changes. >> >> Signed-off-by: Chao Yu <chao@kernel.org> >> --- >> fs/f2fs/f2fs.h | 32 ++++++++------------------------ >> 1 file changed, 8 insertions(+), 24 deletions(-) >> >> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h >> index ec8387da7f74..c378aedcadea 100644 >> --- a/fs/f2fs/f2fs.h >> +++ b/fs/f2fs/f2fs.h >> @@ -1416,11 +1416,8 @@ static inline bool page_private_##name(struct page *page) \ >> #define PAGE_PRIVATE_SET_FUNC(name, flagname) \ >> static inline void set_page_private_##name(struct page *page) \ >> { \ >> - if (!PagePrivate(page)) { \ >> - get_page(page); \ >> - SetPagePrivate(page); \ >> - set_page_private(page, 0); \ >> - } \ >> + if (!PagePrivate(page)) \ >> + attach_page_private(page, (void *)page->private); \ > > attach_page_private(page, (void *)0); Correct, thanks for fixing this. Thanks, > >> set_bit(PAGE_PRIVATE_NOT_POINTER, &page_private(page)); \ >> set_bit(PAGE_PRIVATE_##flagname, &page_private(page)); \ >> } >> @@ -1429,13 +1426,8 @@ static inline void set_page_private_##name(struct page *page) \ >> static inline void clear_page_private_##name(struct page *page) \ >> { \ >> clear_bit(PAGE_PRIVATE_##flagname, &page_private(page)); \ >> - if (page_private(page) == BIT(PAGE_PRIVATE_NOT_POINTER)) { \ >> - set_page_private(page, 0); \ >> - if (PagePrivate(page)) { \ >> - ClearPagePrivate(page); \ >> - put_page(page); \ >> - }\ >> - } \ >> + if (page_private(page) == BIT(PAGE_PRIVATE_NOT_POINTER)) \ >> + detach_page_private(page); \ >> } >> >> PAGE_PRIVATE_GET_FUNC(nonpointer, NOT_POINTER); >> @@ -1464,11 +1456,8 @@ static inline unsigned long get_page_private_data(struct page *page) >> >> static inline void set_page_private_data(struct page *page, unsigned long data) >> { >> - if (!PagePrivate(page)) { >> - get_page(page); >> - SetPagePrivate(page); >> - set_page_private(page, 0); >> - } >> + if (!PagePrivate(page)) >> + attach_page_private(page, 0); >> set_bit(PAGE_PRIVATE_NOT_POINTER, &page_private(page)); >> page_private(page) |= data << PAGE_PRIVATE_MAX; >> } >> @@ -1476,13 +1465,8 @@ static inline void set_page_private_data(struct page *page, unsigned long data) >> static inline void clear_page_private_data(struct page *page) >> { >> page_private(page) &= GENMASK(PAGE_PRIVATE_MAX - 1, 0); >> - if (page_private(page) == BIT(PAGE_PRIVATE_NOT_POINTER)) { >> - set_page_private(page, 0); >> - if (PagePrivate(page)) { >> - ClearPagePrivate(page); >> - put_page(page); >> - } >> - } >> + if (page_private(page) == BIT(PAGE_PRIVATE_NOT_POINTER)) >> + detach_page_private(page); >> } >> >> /* For compression */ >> -- >> 2.25.1 _______________________________________________ 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] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 1/2] f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio 2023-04-10 2:24 [f2fs-dev] [PATCH 1/2] f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio Chao Yu 2023-04-10 2:24 ` [f2fs-dev] [PATCH 2/2] f2fs: clean up with {attach, detach}_page_private() Chao Yu @ 2023-04-10 18:33 ` Jaegeuk Kim 2023-04-11 8:34 ` Chao Yu 1 sibling, 1 reply; 8+ messages in thread From: Jaegeuk Kim @ 2023-04-10 18:33 UTC (permalink / raw) To: Chao Yu; +Cc: linux-kernel, linux-f2fs-devel On 04/10, Chao Yu wrote: > We have maintain PagePrivate and page_private and page reference > w/ {set,clear}_page_private_*, it doesn't need to call > folio_detach_private() in the end of .invalidate_folio and > .release_folio, remove it and use f2fs_bug_on instead. > > Signed-off-by: Chao Yu <chao@kernel.org> > --- > fs/f2fs/data.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c > index 4946df6dd253..8b179b4bdc03 100644 > --- a/fs/f2fs/data.c > +++ b/fs/f2fs/data.c > @@ -3737,7 +3737,8 @@ void f2fs_invalidate_folio(struct folio *folio, size_t offset, size_t length) > inode->i_ino == F2FS_COMPRESS_INO(sbi)) > clear_page_private_data(&folio->page); > > - folio_detach_private(folio); > + f2fs_bug_on(sbi, PagePrivate(&folio->page)); > + f2fs_bug_on(sbi, page_private(&folio->page)); I think we can just check page_private() only. > } > > bool f2fs_release_folio(struct folio *folio, gfp_t wait) > @@ -3759,7 +3760,9 @@ bool f2fs_release_folio(struct folio *folio, gfp_t wait) > clear_page_private_reference(&folio->page); > clear_page_private_gcing(&folio->page); > > - folio_detach_private(folio); > + f2fs_bug_on(sbi, PagePrivate(&folio->page)); > + f2fs_bug_on(sbi, page_private(&folio->page)); > + > return true; > } > > -- > 2.25.1 _______________________________________________ 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] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 1/2] f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio 2023-04-10 18:33 ` [f2fs-dev] [PATCH 1/2] f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio Jaegeuk Kim @ 2023-04-11 8:34 ` Chao Yu 2023-04-11 16:58 ` Jaegeuk Kim 0 siblings, 1 reply; 8+ messages in thread From: Chao Yu @ 2023-04-11 8:34 UTC (permalink / raw) To: Jaegeuk Kim; +Cc: linux-kernel, linux-f2fs-devel On 2023/4/11 2:33, Jaegeuk Kim wrote: > On 04/10, Chao Yu wrote: >> We have maintain PagePrivate and page_private and page reference >> w/ {set,clear}_page_private_*, it doesn't need to call >> folio_detach_private() in the end of .invalidate_folio and >> .release_folio, remove it and use f2fs_bug_on instead. >> >> Signed-off-by: Chao Yu <chao@kernel.org> >> --- >> fs/f2fs/data.c | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c >> index 4946df6dd253..8b179b4bdc03 100644 >> --- a/fs/f2fs/data.c >> +++ b/fs/f2fs/data.c >> @@ -3737,7 +3737,8 @@ void f2fs_invalidate_folio(struct folio *folio, size_t offset, size_t length) >> inode->i_ino == F2FS_COMPRESS_INO(sbi)) >> clear_page_private_data(&folio->page); >> >> - folio_detach_private(folio); >> + f2fs_bug_on(sbi, PagePrivate(&folio->page)); >> + f2fs_bug_on(sbi, page_private(&folio->page)); > > I think we can just check page_private() only. Why? how about the case PagePrivate was set, but page_private was't? It must be a bug as well? Thanks, > >> } >> >> bool f2fs_release_folio(struct folio *folio, gfp_t wait) >> @@ -3759,7 +3760,9 @@ bool f2fs_release_folio(struct folio *folio, gfp_t wait) >> clear_page_private_reference(&folio->page); >> clear_page_private_gcing(&folio->page); >> >> - folio_detach_private(folio); >> + f2fs_bug_on(sbi, PagePrivate(&folio->page)); >> + f2fs_bug_on(sbi, page_private(&folio->page)); >> + >> return true; >> } >> >> -- >> 2.25.1 _______________________________________________ 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] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 1/2] f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio 2023-04-11 8:34 ` Chao Yu @ 2023-04-11 16:58 ` Jaegeuk Kim 2023-04-12 16:16 ` Jaegeuk Kim 0 siblings, 1 reply; 8+ messages in thread From: Jaegeuk Kim @ 2023-04-11 16:58 UTC (permalink / raw) To: Chao Yu; +Cc: linux-kernel, linux-f2fs-devel On 04/11, Chao Yu wrote: > On 2023/4/11 2:33, Jaegeuk Kim wrote: > > On 04/10, Chao Yu wrote: > > > We have maintain PagePrivate and page_private and page reference > > > w/ {set,clear}_page_private_*, it doesn't need to call > > > folio_detach_private() in the end of .invalidate_folio and > > > .release_folio, remove it and use f2fs_bug_on instead. > > > > > > Signed-off-by: Chao Yu <chao@kernel.org> > > > --- > > > fs/f2fs/data.c | 7 +++++-- > > > 1 file changed, 5 insertions(+), 2 deletions(-) > > > > > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c > > > index 4946df6dd253..8b179b4bdc03 100644 > > > --- a/fs/f2fs/data.c > > > +++ b/fs/f2fs/data.c > > > @@ -3737,7 +3737,8 @@ void f2fs_invalidate_folio(struct folio *folio, size_t offset, size_t length) > > > inode->i_ino == F2FS_COMPRESS_INO(sbi)) > > > clear_page_private_data(&folio->page); > > > - folio_detach_private(folio); > > > + f2fs_bug_on(sbi, PagePrivate(&folio->page)); > > > + f2fs_bug_on(sbi, page_private(&folio->page)); > > > > I think we can just check page_private() only. > > Why? how about the case PagePrivate was set, but page_private was't? It must > be a bug as well? Given the code, I think both are set all the time. My concern is someone is not doing set/get properly. Actually, I got a panic on page_private() when running fsstress overnight. I'm trying to reproduce it to find which bit was set. > > Thanks, > > > > > > } > > > bool f2fs_release_folio(struct folio *folio, gfp_t wait) > > > @@ -3759,7 +3760,9 @@ bool f2fs_release_folio(struct folio *folio, gfp_t wait) > > > clear_page_private_reference(&folio->page); > > > clear_page_private_gcing(&folio->page); > > > - folio_detach_private(folio); > > > + f2fs_bug_on(sbi, PagePrivate(&folio->page)); > > > + f2fs_bug_on(sbi, page_private(&folio->page)); > > > + > > > return true; > > > } > > > -- > > > 2.25.1 _______________________________________________ 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] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 1/2] f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio 2023-04-11 16:58 ` Jaegeuk Kim @ 2023-04-12 16:16 ` Jaegeuk Kim 0 siblings, 0 replies; 8+ messages in thread From: Jaegeuk Kim @ 2023-04-12 16:16 UTC (permalink / raw) To: Chao Yu; +Cc: linux-kernel, linux-f2fs-devel On 04/11, Jaegeuk Kim wrote: > On 04/11, Chao Yu wrote: > > On 2023/4/11 2:33, Jaegeuk Kim wrote: > > > On 04/10, Chao Yu wrote: > > > > We have maintain PagePrivate and page_private and page reference > > > > w/ {set,clear}_page_private_*, it doesn't need to call > > > > folio_detach_private() in the end of .invalidate_folio and > > > > .release_folio, remove it and use f2fs_bug_on instead. > > > > > > > > Signed-off-by: Chao Yu <chao@kernel.org> > > > > --- > > > > fs/f2fs/data.c | 7 +++++-- > > > > 1 file changed, 5 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c > > > > index 4946df6dd253..8b179b4bdc03 100644 > > > > --- a/fs/f2fs/data.c > > > > +++ b/fs/f2fs/data.c > > > > @@ -3737,7 +3737,8 @@ void f2fs_invalidate_folio(struct folio *folio, size_t offset, size_t length) > > > > inode->i_ino == F2FS_COMPRESS_INO(sbi)) > > > > clear_page_private_data(&folio->page); > > > > - folio_detach_private(folio); > > > > + f2fs_bug_on(sbi, PagePrivate(&folio->page)); > > > > + f2fs_bug_on(sbi, page_private(&folio->page)); > > > > > > I think we can just check page_private() only. > > > > Why? how about the case PagePrivate was set, but page_private was't? It must > > be a bug as well? > > Given the code, I think both are set all the time. My concern is someone is > not doing set/get properly. Actually, I got a panic on page_private() when > running fsstress overnight. I'm trying to reproduce it to find which bit was > set. It turned out that inline bit is somehow set, guessing the bit was not cleared when the first dirty page was truncated or somewhere else. Anyway, tooking a look at the usecase of flushing inline_data to inode page aggressively, I feel it's kinda hack and may increase the checkpoint latency. Hence, I'd like to remove it simply. https://lore.kernel.org/linux-f2fs-devel/20230412160810.1534632-1-jaegeuk@kernel.org/T/#t > > > > > Thanks, > > > > > > > > > } > > > > bool f2fs_release_folio(struct folio *folio, gfp_t wait) > > > > @@ -3759,7 +3760,9 @@ bool f2fs_release_folio(struct folio *folio, gfp_t wait) > > > > clear_page_private_reference(&folio->page); > > > > clear_page_private_gcing(&folio->page); > > > > - folio_detach_private(folio); > > > > + f2fs_bug_on(sbi, PagePrivate(&folio->page)); > > > > + f2fs_bug_on(sbi, page_private(&folio->page)); > > > > + > > > > return true; > > > > } > > > > -- > > > > 2.25.1 > > > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel _______________________________________________ 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] 8+ messages in thread
end of thread, other threads:[~2023-04-12 16:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-10 2:24 [f2fs-dev] [PATCH 1/2] f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio Chao Yu
2023-04-10 2:24 ` [f2fs-dev] [PATCH 2/2] f2fs: clean up with {attach, detach}_page_private() Chao Yu
2023-04-10 18:47 ` Jaegeuk Kim
2023-04-11 8:37 ` Chao Yu
2023-04-10 18:33 ` [f2fs-dev] [PATCH 1/2] f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio Jaegeuk Kim
2023-04-11 8:34 ` Chao Yu
2023-04-11 16:58 ` Jaegeuk Kim
2023-04-12 16:16 ` Jaegeuk Kim
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox