* [PATCH 1/6] f2fs: fix wrong description in printed log
@ 2026-06-15 13:08 ` Chao Yu via Linux-f2fs-devel
0 siblings, 0 replies; 20+ messages in thread
From: Chao Yu @ 2026-06-15 13:08 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu
This patch fixes wrong description in printed log:
"SSA and SIT" -> "SIT and SSA"
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/gc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 69e0a867219d..0e537508df20 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1897,7 +1897,7 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
sum = SUM_BLK_PAGE_ADDR(sbi, sum_folio, cur_segno);
if (type != GET_SUM_TYPE(sum_footer(sbi, sum))) {
f2fs_err(sbi, "Inconsistent segment (%u) type "
- "[%d, %d] in SSA and SIT",
+ "[%d, %d] in SIT and SSA",
cur_segno, type,
GET_SUM_TYPE(
sum_footer(sbi, sum)));
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [f2fs-dev] [PATCH 1/6] f2fs: fix wrong description in printed log
@ 2026-06-15 13:08 ` Chao Yu via Linux-f2fs-devel
0 siblings, 0 replies; 20+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-06-15 13:08 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel
This patch fixes wrong description in printed log:
"SSA and SIT" -> "SIT and SSA"
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/gc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 69e0a867219d..0e537508df20 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1897,7 +1897,7 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
sum = SUM_BLK_PAGE_ADDR(sbi, sum_folio, cur_segno);
if (type != GET_SUM_TYPE(sum_footer(sbi, sum))) {
f2fs_err(sbi, "Inconsistent segment (%u) type "
- "[%d, %d] in SSA and SIT",
+ "[%d, %d] in SIT and SSA",
cur_segno, type,
GET_SUM_TYPE(
sum_footer(sbi, sum)));
--
2.49.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] 20+ messages in thread
* [PATCH 2/6] f2fs: misc cleanup in f2fs_record_stop_reason()
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
@ 2026-06-15 13:08 ` Chao Yu via Linux-f2fs-devel
-1 siblings, 0 replies; 20+ messages in thread
From: Chao Yu @ 2026-06-15 13:08 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 20577e33ee2a..ff2b9c6e8c32 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -4648,8 +4648,7 @@ static void f2fs_record_stop_reason(struct f2fs_sb_info *sbi)
spin_lock_irqsave(&sbi->error_lock, flags);
if (sbi->error_dirty) {
- memcpy(F2FS_RAW_SUPER(sbi)->s_errors, sbi->errors,
- MAX_F2FS_ERRORS);
+ memcpy(raw_super->s_errors, sbi->errors, MAX_F2FS_ERRORS);
sbi->error_dirty = false;
}
memcpy(raw_super->s_stop_reason, sbi->stop_reason, MAX_STOP_REASON);
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [f2fs-dev] [PATCH 2/6] f2fs: misc cleanup in f2fs_record_stop_reason()
@ 2026-06-15 13:08 ` Chao Yu via Linux-f2fs-devel
0 siblings, 0 replies; 20+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-06-15 13:08 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 20577e33ee2a..ff2b9c6e8c32 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -4648,8 +4648,7 @@ static void f2fs_record_stop_reason(struct f2fs_sb_info *sbi)
spin_lock_irqsave(&sbi->error_lock, flags);
if (sbi->error_dirty) {
- memcpy(F2FS_RAW_SUPER(sbi)->s_errors, sbi->errors,
- MAX_F2FS_ERRORS);
+ memcpy(raw_super->s_errors, sbi->errors, MAX_F2FS_ERRORS);
sbi->error_dirty = false;
}
memcpy(raw_super->s_stop_reason, sbi->stop_reason, MAX_STOP_REASON);
--
2.49.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] 20+ messages in thread
* [PATCH 3/6] f2fs: avoid unnecessary sanity check on ckpt_valid_blocks
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
@ 2026-06-15 13:08 ` Chao Yu via Linux-f2fs-devel
-1 siblings, 0 replies; 20+ messages in thread
From: Chao Yu @ 2026-06-15 13:08 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu
The calculation of sec->ckpt_valid_blocks are the same in both
set_ckpt_valid_blocks() and sanity_check_valid_blocks(), so it
doesn't necessary to call sanity_check_valid_blocks() right after
set_ckpt_valid_blocks().
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/segment.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 1ef4edb77078..f9c688d270e6 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -4802,10 +4802,8 @@ void f2fs_flush_sit_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc)
}
/* update ckpt_valid_block */
- if (__is_large_section(sbi)) {
+ if (__is_large_section(sbi))
set_ckpt_valid_blocks(sbi, segno);
- sanity_check_valid_blocks(sbi, segno);
- }
__clear_bit(segno, bitmap);
sit_i->dirty_sentries--;
@@ -5133,10 +5131,8 @@ static int build_sit_entries(struct f2fs_sb_info *sbi)
if (__is_large_section(sbi)) {
unsigned int segno;
- for (segno = 0; segno < MAIN_SEGS(sbi); segno += SEGS_PER_SEC(sbi)) {
+ for (segno = 0; segno < MAIN_SEGS(sbi); segno += SEGS_PER_SEC(sbi))
set_ckpt_valid_blocks(sbi, segno);
- sanity_check_valid_blocks(sbi, segno);
- }
}
if (err)
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [f2fs-dev] [PATCH 3/6] f2fs: avoid unnecessary sanity check on ckpt_valid_blocks
@ 2026-06-15 13:08 ` Chao Yu via Linux-f2fs-devel
0 siblings, 0 replies; 20+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-06-15 13:08 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel
The calculation of sec->ckpt_valid_blocks are the same in both
set_ckpt_valid_blocks() and sanity_check_valid_blocks(), so it
doesn't necessary to call sanity_check_valid_blocks() right after
set_ckpt_valid_blocks().
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/segment.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 1ef4edb77078..f9c688d270e6 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -4802,10 +4802,8 @@ void f2fs_flush_sit_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc)
}
/* update ckpt_valid_block */
- if (__is_large_section(sbi)) {
+ if (__is_large_section(sbi))
set_ckpt_valid_blocks(sbi, segno);
- sanity_check_valid_blocks(sbi, segno);
- }
__clear_bit(segno, bitmap);
sit_i->dirty_sentries--;
@@ -5133,10 +5131,8 @@ static int build_sit_entries(struct f2fs_sb_info *sbi)
if (__is_large_section(sbi)) {
unsigned int segno;
- for (segno = 0; segno < MAIN_SEGS(sbi); segno += SEGS_PER_SEC(sbi)) {
+ for (segno = 0; segno < MAIN_SEGS(sbi); segno += SEGS_PER_SEC(sbi))
set_ckpt_valid_blocks(sbi, segno);
- sanity_check_valid_blocks(sbi, segno);
- }
}
if (err)
--
2.49.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] 20+ messages in thread
* [PATCH 4/6] f2fs: avoid unnecessary fscrypt_finalize_bounce_page()
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
@ 2026-06-15 13:08 ` Chao Yu via Linux-f2fs-devel
-1 siblings, 0 replies; 20+ messages in thread
From: Chao Yu @ 2026-06-15 13:08 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu
fscrypt_finalize_bounce_page() should be called only if we use fs layer
crypto, let's avoid unnecessary fscrypt_finalize_bounce_page() in error
path of f2fs_write_compressed_pages().
BTW, fscrypt_finalize_bounce_page() will check mapping of bounced page
before retrieving original page, so, previously it won't cause any issue
w/ fscrypt_finalize_bounce_page(), but still we'd better avoid coupling
w/ any logic inside fscrypt_finalize_bounce_page().
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/compress.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index caf522d667d6..aaa0813eabcd 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1455,10 +1455,12 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
out_destroy_crypt:
page_array_free(sbi, cic->rpages, cc->cluster_size);
- for (--i; i >= 0; i--) {
- if (!cc->cpages[i])
- continue;
- fscrypt_finalize_bounce_page(&cc->cpages[i]);
+ if (fio.encrypted) {
+ for (--i; i >= 0; i--) {
+ if (!cc->cpages[i])
+ continue;
+ fscrypt_finalize_bounce_page(&cc->cpages[i]);
+ }
}
out_put_cic:
kmem_cache_free(cic_entry_slab, cic);
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [f2fs-dev] [PATCH 4/6] f2fs: avoid unnecessary fscrypt_finalize_bounce_page()
@ 2026-06-15 13:08 ` Chao Yu via Linux-f2fs-devel
0 siblings, 0 replies; 20+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-06-15 13:08 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel
fscrypt_finalize_bounce_page() should be called only if we use fs layer
crypto, let's avoid unnecessary fscrypt_finalize_bounce_page() in error
path of f2fs_write_compressed_pages().
BTW, fscrypt_finalize_bounce_page() will check mapping of bounced page
before retrieving original page, so, previously it won't cause any issue
w/ fscrypt_finalize_bounce_page(), but still we'd better avoid coupling
w/ any logic inside fscrypt_finalize_bounce_page().
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/compress.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index caf522d667d6..aaa0813eabcd 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1455,10 +1455,12 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
out_destroy_crypt:
page_array_free(sbi, cic->rpages, cc->cluster_size);
- for (--i; i >= 0; i--) {
- if (!cc->cpages[i])
- continue;
- fscrypt_finalize_bounce_page(&cc->cpages[i]);
+ if (fio.encrypted) {
+ for (--i; i >= 0; i--) {
+ if (!cc->cpages[i])
+ continue;
+ fscrypt_finalize_bounce_page(&cc->cpages[i]);
+ }
}
out_put_cic:
kmem_cache_free(cic_entry_slab, cic);
--
2.49.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] 20+ messages in thread
* [PATCH 5/6] f2fs: use fscrypt_finalize_bounce_page() for cleanup
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
@ 2026-06-15 13:08 ` Chao Yu via Linux-f2fs-devel
-1 siblings, 0 replies; 20+ messages in thread
From: Chao Yu @ 2026-06-15 13:08 UTC (permalink / raw)
To: jaegeuk
Cc: linux-f2fs-devel, linux-kernel, Chao Yu, Matthew Wilcox,
Eric Biggers
No logic changes.
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/data.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 9c6440a7db0e..02d498d549b0 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -358,14 +358,11 @@ static void f2fs_write_end_io(struct bio *bio)
bio_for_each_folio_all(fi, bio) {
struct folio *folio = fi.folio;
+ struct page *page = &folio->page;
enum count_type type;
- if (fscrypt_is_bounce_folio(folio)) {
- struct folio *io_folio = folio;
-
- folio = fscrypt_pagecache_folio(io_folio);
- fscrypt_free_bounce_page(&io_folio->page);
- }
+ fscrypt_finalize_bounce_page(&page);
+ folio = page_folio(page);
#ifdef CONFIG_F2FS_FS_COMPRESSION
if (f2fs_is_compressed_page(folio)) {
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [f2fs-dev] [PATCH 5/6] f2fs: use fscrypt_finalize_bounce_page() for cleanup
@ 2026-06-15 13:08 ` Chao Yu via Linux-f2fs-devel
0 siblings, 0 replies; 20+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-06-15 13:08 UTC (permalink / raw)
To: jaegeuk; +Cc: Eric Biggers, linux-kernel, Matthew Wilcox, linux-f2fs-devel
No logic changes.
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/data.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 9c6440a7db0e..02d498d549b0 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -358,14 +358,11 @@ static void f2fs_write_end_io(struct bio *bio)
bio_for_each_folio_all(fi, bio) {
struct folio *folio = fi.folio;
+ struct page *page = &folio->page;
enum count_type type;
- if (fscrypt_is_bounce_folio(folio)) {
- struct folio *io_folio = folio;
-
- folio = fscrypt_pagecache_folio(io_folio);
- fscrypt_free_bounce_page(&io_folio->page);
- }
+ fscrypt_finalize_bounce_page(&page);
+ folio = page_folio(page);
#ifdef CONFIG_F2FS_FS_COMPRESSION
if (f2fs_is_compressed_page(folio)) {
--
2.49.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] 20+ messages in thread
* [PATCH 6/6] f2fs: remove unneeded f2fs_is_compressed_page()
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
@ 2026-06-15 13:08 ` Chao Yu via Linux-f2fs-devel
-1 siblings, 0 replies; 20+ messages in thread
From: Chao Yu @ 2026-06-15 13:08 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu
We have checked f2fs_is_compressed_page() before f2fs_compress_write_end_io(),
so we don't need to check the status again, remove it.
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/compress.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index aaa0813eabcd..b1209619bb64 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1486,8 +1486,7 @@ void f2fs_compress_write_end_io(struct bio *bio, struct folio *folio)
struct page *page = &folio->page;
struct f2fs_sb_info *sbi = bio->bi_private;
struct compress_io_ctx *cic = folio->private;
- enum count_type type = WB_DATA_TYPE(folio,
- f2fs_is_compressed_page(folio));
+ enum count_type type = WB_DATA_TYPE(folio, true);
int i;
if (unlikely(bio->bi_status != BLK_STS_OK))
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [f2fs-dev] [PATCH 6/6] f2fs: remove unneeded f2fs_is_compressed_page()
@ 2026-06-15 13:08 ` Chao Yu via Linux-f2fs-devel
0 siblings, 0 replies; 20+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-06-15 13:08 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel
We have checked f2fs_is_compressed_page() before f2fs_compress_write_end_io(),
so we don't need to check the status again, remove it.
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/compress.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index aaa0813eabcd..b1209619bb64 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1486,8 +1486,7 @@ void f2fs_compress_write_end_io(struct bio *bio, struct folio *folio)
struct page *page = &folio->page;
struct f2fs_sb_info *sbi = bio->bi_private;
struct compress_io_ctx *cic = folio->private;
- enum count_type type = WB_DATA_TYPE(folio,
- f2fs_is_compressed_page(folio));
+ enum count_type type = WB_DATA_TYPE(folio, true);
int i;
if (unlikely(bio->bi_status != BLK_STS_OK))
--
2.49.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] 20+ messages in thread
* Re: [f2fs-dev] [PATCH 5/6] f2fs: use fscrypt_finalize_bounce_page() for cleanup
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
@ 2026-06-15 13:11 ` Matthew Wilcox
-1 siblings, 0 replies; 20+ messages in thread
From: Matthew Wilcox @ 2026-06-15 13:11 UTC (permalink / raw)
To: Chao Yu; +Cc: Eric Biggers, jaegeuk, linux-kernel, linux-f2fs-devel
On Mon, Jun 15, 2026 at 09:08:21PM +0800, Chao Yu wrote:
> No logic changes.
This seems like a step backwards. We should be looking to convert to
a future fscrypt_finalize_bounce_folio(), if anything.
_______________________________________________
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] 20+ messages in thread
* Re: [PATCH 5/6] f2fs: use fscrypt_finalize_bounce_page() for cleanup
@ 2026-06-15 13:11 ` Matthew Wilcox
0 siblings, 0 replies; 20+ messages in thread
From: Matthew Wilcox @ 2026-06-15 13:11 UTC (permalink / raw)
To: Chao Yu; +Cc: jaegeuk, linux-f2fs-devel, linux-kernel, Eric Biggers
On Mon, Jun 15, 2026 at 09:08:21PM +0800, Chao Yu wrote:
> No logic changes.
This seems like a step backwards. We should be looking to convert to
a future fscrypt_finalize_bounce_folio(), if anything.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [f2fs-dev] [PATCH 4/6] f2fs: avoid unnecessary fscrypt_finalize_bounce_page()
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
@ 2026-06-15 22:14 ` Jaegeuk Kim
-1 siblings, 0 replies; 20+ messages in thread
From: Jaegeuk Kim via Linux-f2fs-devel @ 2026-06-15 22:14 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-kernel, linux-f2fs-devel
On 06/15, Chao Yu via Linux-f2fs-devel wrote:
> fscrypt_finalize_bounce_page() should be called only if we use fs layer
> crypto, let's avoid unnecessary fscrypt_finalize_bounce_page() in error
> path of f2fs_write_compressed_pages().
>
> BTW, fscrypt_finalize_bounce_page() will check mapping of bounced page
> before retrieving original page, so, previously it won't cause any issue
> w/ fscrypt_finalize_bounce_page(), but still we'd better avoid coupling
> w/ any logic inside fscrypt_finalize_bounce_page().
>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
> fs/f2fs/compress.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
> index caf522d667d6..aaa0813eabcd 100644
> --- a/fs/f2fs/compress.c
> +++ b/fs/f2fs/compress.c
> @@ -1455,10 +1455,12 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
> out_destroy_crypt:
> page_array_free(sbi, cic->rpages, cc->cluster_size);
>
> - for (--i; i >= 0; i--) {
> - if (!cc->cpages[i])
> - continue;
> - fscrypt_finalize_bounce_page(&cc->cpages[i]);
> + if (fio.encrypted) {
> + for (--i; i >= 0; i--) {
> + if (!cc->cpages[i])
> + continue;
> + fscrypt_finalize_bounce_page(&cc->cpages[i]);
> + }
Applied as:
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1455,6 +1455,9 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
out_destroy_crypt:
page_array_free(sbi, cic->rpages, cc->cluster_size);
+ if (!fio.encrypted)
+ goto out_put_cic;
+
for (--i; i >= 0; i--) {
if (!cc->cpages[i])
continue;
> }
> out_put_cic:
> kmem_cache_free(cic_entry_slab, cic);
> --
> 2.49.0
>
>
>
> _______________________________________________
> 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] 20+ messages in thread
* Re: [f2fs-dev] [PATCH 4/6] f2fs: avoid unnecessary fscrypt_finalize_bounce_page()
@ 2026-06-15 22:14 ` Jaegeuk Kim
0 siblings, 0 replies; 20+ messages in thread
From: Jaegeuk Kim @ 2026-06-15 22:14 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-kernel, linux-f2fs-devel
On 06/15, Chao Yu via Linux-f2fs-devel wrote:
> fscrypt_finalize_bounce_page() should be called only if we use fs layer
> crypto, let's avoid unnecessary fscrypt_finalize_bounce_page() in error
> path of f2fs_write_compressed_pages().
>
> BTW, fscrypt_finalize_bounce_page() will check mapping of bounced page
> before retrieving original page, so, previously it won't cause any issue
> w/ fscrypt_finalize_bounce_page(), but still we'd better avoid coupling
> w/ any logic inside fscrypt_finalize_bounce_page().
>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
> fs/f2fs/compress.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
> index caf522d667d6..aaa0813eabcd 100644
> --- a/fs/f2fs/compress.c
> +++ b/fs/f2fs/compress.c
> @@ -1455,10 +1455,12 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
> out_destroy_crypt:
> page_array_free(sbi, cic->rpages, cc->cluster_size);
>
> - for (--i; i >= 0; i--) {
> - if (!cc->cpages[i])
> - continue;
> - fscrypt_finalize_bounce_page(&cc->cpages[i]);
> + if (fio.encrypted) {
> + for (--i; i >= 0; i--) {
> + if (!cc->cpages[i])
> + continue;
> + fscrypt_finalize_bounce_page(&cc->cpages[i]);
> + }
Applied as:
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1455,6 +1455,9 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
out_destroy_crypt:
page_array_free(sbi, cic->rpages, cc->cluster_size);
+ if (!fio.encrypted)
+ goto out_put_cic;
+
for (--i; i >= 0; i--) {
if (!cc->cpages[i])
continue;
> }
> out_put_cic:
> kmem_cache_free(cic_entry_slab, cic);
> --
> 2.49.0
>
>
>
> _______________________________________________
> 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] 20+ messages in thread
* Re: [f2fs-dev] [PATCH 1/6] f2fs: fix wrong description in printed log
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
@ 2026-06-16 2:50 ` patchwork-bot+f2fs
-1 siblings, 0 replies; 20+ messages in thread
From: patchwork-bot+f2fs--- via Linux-f2fs-devel @ 2026-06-16 2:50 UTC (permalink / raw)
To: Chao Yu; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel
Hello:
This series was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Mon, 15 Jun 2026 21:08:17 +0800 you wrote:
> This patch fixes wrong description in printed log:
>
> "SSA and SIT" -> "SIT and SSA"
>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
> fs/f2fs/gc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [f2fs-dev,1/6] f2fs: fix wrong description in printed log
https://git.kernel.org/jaegeuk/f2fs/c/123a88353dac
- [f2fs-dev,2/6] f2fs: misc cleanup in f2fs_record_stop_reason()
https://git.kernel.org/jaegeuk/f2fs/c/a1c83470ed0b
- [f2fs-dev,3/6] f2fs: avoid unnecessary sanity check on ckpt_valid_blocks
https://git.kernel.org/jaegeuk/f2fs/c/701959ef9b9f
- [f2fs-dev,4/6] f2fs: avoid unnecessary fscrypt_finalize_bounce_page()
(no matching commit)
- [f2fs-dev,5/6] f2fs: use fscrypt_finalize_bounce_page() for cleanup
(no matching commit)
- [f2fs-dev,6/6] f2fs: remove unneeded f2fs_is_compressed_page()
https://git.kernel.org/jaegeuk/f2fs/c/7cc48ead1a8a
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] 20+ messages in thread
* Re: [f2fs-dev] [PATCH 1/6] f2fs: fix wrong description in printed log
@ 2026-06-16 2:50 ` patchwork-bot+f2fs
0 siblings, 0 replies; 20+ messages in thread
From: patchwork-bot+f2fs @ 2026-06-16 2:50 UTC (permalink / raw)
To: Chao Yu; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel
Hello:
This series was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Mon, 15 Jun 2026 21:08:17 +0800 you wrote:
> This patch fixes wrong description in printed log:
>
> "SSA and SIT" -> "SIT and SSA"
>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
> fs/f2fs/gc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [f2fs-dev,1/6] f2fs: fix wrong description in printed log
https://git.kernel.org/jaegeuk/f2fs/c/123a88353dac
- [f2fs-dev,2/6] f2fs: misc cleanup in f2fs_record_stop_reason()
https://git.kernel.org/jaegeuk/f2fs/c/a1c83470ed0b
- [f2fs-dev,3/6] f2fs: avoid unnecessary sanity check on ckpt_valid_blocks
https://git.kernel.org/jaegeuk/f2fs/c/701959ef9b9f
- [f2fs-dev,4/6] f2fs: avoid unnecessary fscrypt_finalize_bounce_page()
(no matching commit)
- [f2fs-dev,5/6] f2fs: use fscrypt_finalize_bounce_page() for cleanup
(no matching commit)
- [f2fs-dev,6/6] f2fs: remove unneeded f2fs_is_compressed_page()
https://git.kernel.org/jaegeuk/f2fs/c/7cc48ead1a8a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [f2fs-dev] [PATCH 4/6] f2fs: avoid unnecessary fscrypt_finalize_bounce_page()
2026-06-15 22:14 ` Jaegeuk Kim
@ 2026-06-16 3:12 ` Chao Yu via Linux-f2fs-devel
-1 siblings, 0 replies; 20+ messages in thread
From: Chao Yu @ 2026-06-16 3:12 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: chao, linux-kernel, linux-f2fs-devel
On 6/16/26 06:14, Jaegeuk Kim wrote:
> On 06/15, Chao Yu via Linux-f2fs-devel wrote:
>> fscrypt_finalize_bounce_page() should be called only if we use fs layer
>> crypto, let's avoid unnecessary fscrypt_finalize_bounce_page() in error
>> path of f2fs_write_compressed_pages().
>>
>> BTW, fscrypt_finalize_bounce_page() will check mapping of bounced page
>> before retrieving original page, so, previously it won't cause any issue
>> w/ fscrypt_finalize_bounce_page(), but still we'd better avoid coupling
>> w/ any logic inside fscrypt_finalize_bounce_page().
>>
>> Signed-off-by: Chao Yu <chao@kernel.org>
>> ---
>> fs/f2fs/compress.c | 10 ++++++----
>> 1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
>> index caf522d667d6..aaa0813eabcd 100644
>> --- a/fs/f2fs/compress.c
>> +++ b/fs/f2fs/compress.c
>> @@ -1455,10 +1455,12 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
>> out_destroy_crypt:
>> page_array_free(sbi, cic->rpages, cc->cluster_size);
>>
>> - for (--i; i >= 0; i--) {
>> - if (!cc->cpages[i])
>> - continue;
>> - fscrypt_finalize_bounce_page(&cc->cpages[i]);
>> + if (fio.encrypted) {
>> + for (--i; i >= 0; i--) {
>> + if (!cc->cpages[i])
>> + continue;
>> + fscrypt_finalize_bounce_page(&cc->cpages[i]);
>> + }
>
> Applied as:
>
> --- a/fs/f2fs/compress.c
> +++ b/fs/f2fs/compress.c
> @@ -1455,6 +1455,9 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
> out_destroy_crypt:
> page_array_free(sbi, cic->rpages, cc->cluster_size);
>
> + if (!fio.encrypted)
> + goto out_put_cic;
Looks fine to me.
Thanks,
> +
> for (--i; i >= 0; i--) {
> if (!cc->cpages[i])
> continue;
>
>
>> }
>> out_put_cic:
>> kmem_cache_free(cic_entry_slab, cic);
>> --
>> 2.49.0
>>
>>
>>
>> _______________________________________________
>> 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] 20+ messages in thread
* Re: [f2fs-dev] [PATCH 4/6] f2fs: avoid unnecessary fscrypt_finalize_bounce_page()
@ 2026-06-16 3:12 ` Chao Yu via Linux-f2fs-devel
0 siblings, 0 replies; 20+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-06-16 3:12 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-kernel, linux-f2fs-devel
On 6/16/26 06:14, Jaegeuk Kim wrote:
> On 06/15, Chao Yu via Linux-f2fs-devel wrote:
>> fscrypt_finalize_bounce_page() should be called only if we use fs layer
>> crypto, let's avoid unnecessary fscrypt_finalize_bounce_page() in error
>> path of f2fs_write_compressed_pages().
>>
>> BTW, fscrypt_finalize_bounce_page() will check mapping of bounced page
>> before retrieving original page, so, previously it won't cause any issue
>> w/ fscrypt_finalize_bounce_page(), but still we'd better avoid coupling
>> w/ any logic inside fscrypt_finalize_bounce_page().
>>
>> Signed-off-by: Chao Yu <chao@kernel.org>
>> ---
>> fs/f2fs/compress.c | 10 ++++++----
>> 1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
>> index caf522d667d6..aaa0813eabcd 100644
>> --- a/fs/f2fs/compress.c
>> +++ b/fs/f2fs/compress.c
>> @@ -1455,10 +1455,12 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
>> out_destroy_crypt:
>> page_array_free(sbi, cic->rpages, cc->cluster_size);
>>
>> - for (--i; i >= 0; i--) {
>> - if (!cc->cpages[i])
>> - continue;
>> - fscrypt_finalize_bounce_page(&cc->cpages[i]);
>> + if (fio.encrypted) {
>> + for (--i; i >= 0; i--) {
>> + if (!cc->cpages[i])
>> + continue;
>> + fscrypt_finalize_bounce_page(&cc->cpages[i]);
>> + }
>
> Applied as:
>
> --- a/fs/f2fs/compress.c
> +++ b/fs/f2fs/compress.c
> @@ -1455,6 +1455,9 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
> out_destroy_crypt:
> page_array_free(sbi, cic->rpages, cc->cluster_size);
>
> + if (!fio.encrypted)
> + goto out_put_cic;
Looks fine to me.
Thanks,
> +
> for (--i; i >= 0; i--) {
> if (!cc->cpages[i])
> continue;
>
>
>> }
>> out_put_cic:
>> kmem_cache_free(cic_entry_slab, cic);
>> --
>> 2.49.0
>>
>>
>>
>> _______________________________________________
>> 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] 20+ messages in thread
end of thread, other threads:[~2026-06-16 3:12 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-15 13:08 [PATCH 1/6] f2fs: fix wrong description in printed log Chao Yu
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2026-06-15 13:08 ` [PATCH 2/6] f2fs: misc cleanup in f2fs_record_stop_reason() Chao Yu
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2026-06-15 13:08 ` [PATCH 3/6] f2fs: avoid unnecessary sanity check on ckpt_valid_blocks Chao Yu
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2026-06-15 13:08 ` [PATCH 4/6] f2fs: avoid unnecessary fscrypt_finalize_bounce_page() Chao Yu
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2026-06-15 22:14 ` Jaegeuk Kim via Linux-f2fs-devel
2026-06-15 22:14 ` Jaegeuk Kim
2026-06-16 3:12 ` Chao Yu
2026-06-16 3:12 ` Chao Yu via Linux-f2fs-devel
2026-06-15 13:08 ` [PATCH 5/6] f2fs: use fscrypt_finalize_bounce_page() for cleanup Chao Yu
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2026-06-15 13:11 ` Matthew Wilcox
2026-06-15 13:11 ` Matthew Wilcox
2026-06-15 13:08 ` [PATCH 6/6] f2fs: remove unneeded f2fs_is_compressed_page() Chao Yu
2026-06-15 13:08 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2026-06-16 2:50 ` [f2fs-dev] [PATCH 1/6] f2fs: fix wrong description in printed log patchwork-bot+f2fs--- via Linux-f2fs-devel
2026-06-16 2:50 ` patchwork-bot+f2fs
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.