Skip to contentSkip to conversation

f2fs: compress: add compress_inode to cache compressed blocks

PATCH New Chao Yu 2 participants 4 messages May 10, 2021

Subsystems (2)

v5 of 6 New Latest is v6 →

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH v5 1/1 f2fs: compress: add compress_inode to cache compressed blocks

Support to use address space of inner inode to cache compressed block, in order to improve cache hit ratio of random read.

---
v5:
- adapt to new page.private layout
- truncate compress inode in advance during umount to avoid checking and invalidating compress cache in per-inode evict().

 Documentation/filesystems/f2fs.rst |   3 +
 fs/f2fs/compress.c                 | 180 ++++++++++++++++++++++++++++-
 fs/f2fs/data.c                     |  41 ++++++-
 fs/f2fs/debug.c                    |  13 +++
 fs/f2fs/f2fs.h                     |  71 +++++++++++-
 fs/f2fs/gc.c                       |   1 +
 fs/f2fs/inode.c                    |  21 +++-
 fs/f2fs/segment.c                  |   6 +-
 fs/f2fs/super.c                    |  33 +++++-
 include/linux/f2fs_fs.h            |   1 +
 10 files changed, 356 insertions(+), 14 deletions(-)
Documentation/filesystems/f2fs.rst +3 -0
index 992bf91eeec8..809c4d0a696f 100644
@@ -289,6 +289,9 @@ compress_mode=%s	 Control file compression mode. This supports "fs" and "user"
 			 choosing the target file and the timing. The user can do manual
 			 compression/decompression on the compression enabled files using
 			 ioctls.
+compress_cache		 Support to use address space of a filesystem managed inode to
+			 cache compressed block, in order to improve cache hit ratio of
+			 random read.
 inlinecrypt		 When possible, encrypt/decrypt the contents of encrypted
 			 files using the blk-crypto framework rather than
 			 filesystem-layer encryption. This allows the use of
fs/f2fs/compress.c +178 -2

213 lines not on this page · raw message

fs/f2fs/data.c +35 -6

99 lines not on this page · raw message

fs/f2fs/debug.c +13 -0
index c03949a7ccff..833325038ef3 100644
@@ -152,6 +152,12 @@ static void update_general_status(struct f2fs_sb_info *sbi)
 		si->node_pages = NODE_MAPPING(sbi)->nrpages;
 	if (sbi->meta_inode)
 		si->meta_pages = META_MAPPING(sbi)->nrpages;
+#ifdef CONFIG_F2FS_FS_COMPRESSION
+	if (sbi->compress_inode) {
+		si->compress_pages = COMPRESS_MAPPING(sbi)->nrpages;
+		si->compress_page_hit = atomic_read(&sbi->compress_page_hit);
+	}
+#endif
 	si->nats = NM_I(sbi)->nat_cnt[TOTAL_NAT];
 	si->dirty_nats = NM_I(sbi)->nat_cnt[DIRTY_NAT];
 	si->sits = MAIN_SEGS(sbi);
@@ -309,6 +315,12 @@ static void update_mem_info(struct f2fs_sb_info *sbi)
 
 		si->page_mem += (unsigned long long)npages << PAGE_SHIFT;
 	}
+#ifdef CONFIG_F2FS_FS_COMPRESSION
+	if (sbi->compress_inode) {
+		unsigned npages = COMPRESS_MAPPING(sbi)->nrpages;
+		si->page_mem += (unsigned long long)npages << PAGE_SHIFT;
+	}
+#endif
 }
 
 static int stat_show(struct seq_file *s, void *v)
@@ -476,6 +488,7 @@ static int stat_show(struct seq_file *s, void *v)
 			"volatile IO: %4d (Max. %4d)\n",
 			   si->inmem_pages, si->aw_cnt, si->max_aw_cnt,
 			   si->vw_cnt, si->max_vw_cnt);
+		seq_printf(s, "  - compress: %4d, hit:%8d\n", si->compress_pages, si->compress_page_hit);
 		seq_printf(s, "  - nodes: %4d in %4d\n",
 			   si->ndirty_node, si->node_pages);
 		seq_printf(s, "  - dents: %4d in dirs:%4d (%4d)\n",
fs/f2fs/f2fs.h +68 -3

133 lines not on this page · raw message

fs/f2fs/gc.c +1 -0
index ff54db6eb1a1..0a5649348143 100644
@@ -1261,6 +1261,7 @@ static int move_data_block(struct inode *inode, block_t bidx,
 	f2fs_put_page(mpage, 1);
 	invalidate_mapping_pages(META_MAPPING(fio.sbi),
 				fio.old_blkaddr, fio.old_blkaddr);
+	f2fs_invalidate_compress_page(fio.sbi, fio.old_blkaddr);
 
 	set_page_dirty(fio.encrypted_page);
 	if (clear_page_dirty_for_io(fio.encrypted_page))
fs/f2fs/inode.c +20 -1
index cbda7ca3b3be..9141147b5bb0 100644
@@ -18,6 +18,10 @@
 
 #include <trace/events/f2fs.h>
 
+#ifdef CONFIG_F2FS_FS_COMPRESSION
+extern const struct address_space_operations f2fs_compress_aops;
+#endif
+
 void f2fs_mark_inode_dirty_sync(struct inode *inode, bool sync)
 {
 	if (is_inode_flag_set(inode, FI_NEW_INODE))
@@ -494,6 +498,11 @@ struct inode *f2fs_iget(struct super_block *sb, unsigned long ino)
 	if (ino == F2FS_NODE_INO(sbi) || ino == F2FS_META_INO(sbi))
 		goto make_now;
 
+#ifdef CONFIG_F2FS_FS_COMPRESSION
+	if (ino == F2FS_COMPRESS_INO(sbi))
+		goto make_now;
+#endif
+
 	ret = do_read_inode(inode);
 	if (ret)
 		goto bad_inode;
@@ -504,6 +513,12 @@ struct inode *f2fs_iget(struct super_block *sb, unsigned long ino)
 	} else if (ino == F2FS_META_INO(sbi)) {
 		inode->i_mapping->a_ops = &f2fs_meta_aops;
 		mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS);
+	} else if (ino == F2FS_COMPRESS_INO(sbi)) {
+#ifdef CONFIG_F2FS_FS_COMPRESSION
+		inode->i_mapping->a_ops = &f2fs_compress_aops;
+#endif
+		mapping_set_gfp_mask(inode->i_mapping,
+			GFP_NOFS | __GFP_HIGHMEM | __GFP_MOVABLE);
 	} else if (S_ISREG(inode->i_mode)) {
 		inode->i_op = &f2fs_file_inode_operations;
 		inode->i_fop = &f2fs_file_operations;
@@ -723,8 +738,12 @@ void f2fs_evict_inode(struct inode *inode)
 	trace_f2fs_evict_inode(inode);
 	truncate_inode_pages_final(&inode->i_data);
 
+	if (test_opt(sbi, COMPRESS_CACHE) && f2fs_compressed_file(inode))
+		f2fs_invalidate_compress_pages(sbi, inode->i_ino);
+
 	if (inode->i_ino == F2FS_NODE_INO(sbi) ||
-			inode->i_ino == F2FS_META_INO(sbi))
+			inode->i_ino == F2FS_META_INO(sbi) ||
+			inode->i_ino == F2FS_COMPRESS_INO(sbi))
 		goto out_clear;
 
 	f2fs_bug_on(sbi, get_dirty_pages(inode));
fs/f2fs/segment.c +5 -1
index ad8c88aa2c66..778fc236be90 100644
@@ -2322,6 +2322,7 @@ void f2fs_invalidate_blocks(struct f2fs_sb_info *sbi, block_t addr)
 		return;
 
 	invalidate_mapping_pages(META_MAPPING(sbi), addr, addr);
+	f2fs_invalidate_compress_page(sbi, addr);
 
 	/* add it into sit main buffer */
 	down_write(&sit_i->sentry_lock);
@@ -3469,9 +3470,11 @@ static void do_write_page(struct f2fs_summary *sum, struct f2fs_io_info *fio)
 reallocate:
 	f2fs_allocate_data_block(fio->sbi, fio->page, fio->old_blkaddr,
 			&fio->new_blkaddr, sum, type, fio);
-	if (GET_SEGNO(fio->sbi, fio->old_blkaddr) != NULL_SEGNO)
+	if (GET_SEGNO(fio->sbi, fio->old_blkaddr) != NULL_SEGNO) {
 		invalidate_mapping_pages(META_MAPPING(fio->sbi),
 					fio->old_blkaddr, fio->old_blkaddr);
+		f2fs_invalidate_compress_page(fio->sbi, fio->old_blkaddr);
+	}
 
 	/* writeout dirty page into bdev */
 	f2fs_submit_page_write(fio);
@@ -3661,6 +3664,7 @@ void f2fs_do_replace_block(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
 	if (GET_SEGNO(sbi, old_blkaddr) != NULL_SEGNO) {
 		invalidate_mapping_pages(META_MAPPING(sbi),
 					old_blkaddr, old_blkaddr);
+		f2fs_invalidate_compress_page(sbi, old_blkaddr);
 		if (!from_gc)
 			update_segment_mtime(sbi, old_blkaddr, 0);
 		update_sit_entry(sbi, old_blkaddr, -1);
fs/f2fs/super.c +32 -1
index 7d325bfaf65a..370f3f0387bd 100644
@@ -150,6 +150,7 @@ enum {
 	Opt_compress_extension,
 	Opt_compress_chksum,
 	Opt_compress_mode,
+	Opt_compress_cache,
 	Opt_atgc,
 	Opt_gc_merge,
 	Opt_nogc_merge,
@@ -224,6 +225,7 @@ static match_table_t f2fs_tokens = {
 	{Opt_compress_extension, "compress_extension=%s"},
 	{Opt_compress_chksum, "compress_chksum"},
 	{Opt_compress_mode, "compress_mode=%s"},
+	{Opt_compress_cache, "compress_cache"},
 	{Opt_atgc, "atgc"},
 	{Opt_gc_merge, "gc_merge"},
 	{Opt_nogc_merge, "nogc_merge"},
@@ -1066,12 +1068,16 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
 			}
 			kfree(name);
 			break;
+		case Opt_compress_cache:
+			set_opt(sbi, COMPRESS_CACHE);
+			break;
 #else
 		case Opt_compress_algorithm:
 		case Opt_compress_log_size:
 		case Opt_compress_extension:
 		case Opt_compress_chksum:
 		case Opt_compress_mode:
+		case Opt_compress_cache:
 			f2fs_info(sbi, "compression options not supported");
 			break;
 #endif
@@ -1403,6 +1409,8 @@ static void f2fs_put_super(struct super_block *sb)
 
 	f2fs_bug_on(sbi, sbi->fsync_node_num);
 
+	f2fs_destroy_compress_inode(sbi);
+
 	iput(sbi->node_inode);
 	sbi->node_inode = NULL;
 
@@ -1672,6 +1680,9 @@ static inline void f2fs_show_compress_options(struct seq_file *seq,
 		seq_printf(seq, ",compress_mode=%s", "fs");
 	else if (F2FS_OPTION(sbi).compress_mode == COMPR_MODE_USER)
 		seq_printf(seq, ",compress_mode=%s", "user");
+
+	if (test_opt(sbi, COMPRESS_CACHE))
+		seq_puts(seq, ",compress_cache");
 }
 #endif
 
@@ -1949,6 +1960,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
 	bool disable_checkpoint = test_opt(sbi, DISABLE_CHECKPOINT);
 	bool no_io_align = !F2FS_IO_ALIGNED(sbi);
 	bool no_atgc = !test_opt(sbi, ATGC);
+	bool no_compress_cache = !test_opt(sbi, COMPRESS_CACHE);
 	bool checkpoint_changed;
 #ifdef CONFIG_QUOTA
 	int i, j;
@@ -2041,6 +2053,12 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
 		goto restore_opts;
 	}
 
+	if (no_compress_cache == !!test_opt(sbi, COMPRESS_CACHE)) {
+		err = -EINVAL;
+		f2fs_warn(sbi, "switch compress_cache option is not allowed");
+		goto restore_opts;
+	}
+
 	if ((*flags & SB_RDONLY) && test_opt(sbi, DISABLE_CHECKPOINT)) {
 		err = -EINVAL;
 		f2fs_warn(sbi, "disabling checkpoint not compatible with read-only");
@@ -3940,10 +3958,14 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
 		goto free_node_inode;
 	}
 
-	err = f2fs_register_sysfs(sbi);
+	err = f2fs_init_compress_inode(sbi);
 	if (err)
 		goto free_root_inode;
 
+	err = f2fs_register_sysfs(sbi);
+	if (err)
+		goto free_compress_inode;
+
 #ifdef CONFIG_QUOTA
 	/* Enable quota usage during mount */
 	if (f2fs_sb_has_quota_ino(sbi) && !f2fs_readonly(sb)) {
@@ -4084,6 +4106,8 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
 	/* evict some inodes being cached by GC */
 	evict_inodes(sb);
 	f2fs_unregister_sysfs(sbi);
+free_compress_inode:
+	f2fs_destroy_compress_inode(sbi);
 free_root_inode:
 	dput(sb->s_root);
 	sb->s_root = NULL;
@@ -4162,6 +4186,13 @@ static void kill_f2fs_super(struct super_block *sb)
 		f2fs_stop_gc_thread(sbi);
 		f2fs_stop_discard_thread(sbi);
 
+		/*
+		 * latter evict_inode() can bypass checking and invalidating
+		 * compress inode cache.
+		 */
+		if (test_opt(sbi, COMPRESS_CACHE))
+			truncate_inode_pages_final(COMPRESS_MAPPING(sbi));
+
 		if (is_sbi_flag_set(sbi, SBI_IS_DIRTY) ||
 				!is_set_ckpt_flags(sbi, CP_UMOUNT_FLAG)) {
 			struct cp_control cpc = {
include/linux/f2fs_fs.h +1 -0
index 5487a80617a3..0021ea8f7c3b 100644
@@ -34,6 +34,7 @@
 #define F2FS_ROOT_INO(sbi)	((sbi)->root_ino_num)
 #define F2FS_NODE_INO(sbi)	((sbi)->node_ino_num)
 #define F2FS_META_INO(sbi)	((sbi)->meta_ino_num)
+#define F2FS_COMPRESS_INO(sbi)	(NM_I(sbi)->max_nid)
 
 #define F2FS_MAX_QUOTAS		3
 
Signature · 1 line
2.29.2
#1 lore raw
I love your patch! Yet something to improve:

Hi Chao,

I love your patch! Yet something to improve:

[auto build test ERROR on f2fs/dev-test]
[cannot apply to v5.13-rc1 next-20210510]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Chao-Yu/f2fs-compress-add-compress_inode-to-cache-compressed-blocks/20210510-173127
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
config: powerpc-randconfig-r013-20210510 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 492173d42b32cb91d5d0d72d5ed84fcab80d059a)

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/0day-ci/linux/commit/28d803e509b3847a31e73d7bd20b9f7b7e559471
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chao-Yu/f2fs-compress-add-compress_inode-to-cache-compressed-blocks/20210510-173127 git checkout 28d803e509b3847a31e73d7bd20b9f7b7e559471
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc

If you fix the issue, kindly add following tag as appropriate

All error/warnings (new ones prefixed by >>):

>> fs/f2fs/super.c:4194:31: error: implicit declaration of function 'COMPRESS_MAPPING' [-Werror,-Wimplicit-function-declaration]
                           truncate_inode_pages_final(COMPRESS_MAPPING(sbi));
                                                      ^
>> fs/f2fs/super.c:4194:31: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct address_space *' [-Wint-conversion]
                           truncate_inode_pages_final(COMPRESS_MAPPING(sbi));
                                                      ^~~~~~~~~~~~~~~~~~~~~
   include/linux/mm.h:2625:62: note: passing argument to parameter here
   extern void truncate_inode_pages_final(struct address_space *);
                                                                ^

1 warning and 1 error generated.

vim +/COMPRESS_MAPPING +4194 fs/f2fs/super.c

4179
4180 static void kill_f2fs_super(struct super_block *sb)
4181 {
4182 if (sb->s_root) {
4183 struct f2fs_sb_info *sbi = F2FS_SB(sb);
4184
4185 set_sbi_flag(sbi, SBI_IS_CLOSE);
4186 f2fs_stop_gc_thread(sbi);
4187 f2fs_stop_discard_thread(sbi);
4188
4189 /*
4190 * latter evict_inode() can bypass checking and invalidating
4191 * compress inode cache.
4192 */
4193 if (test_opt(sbi, COMPRESS_CACHE))

> 4194				truncate_inode_pages_final(COMPRESS_MAPPING(sbi));

4195
4196 if (is_sbi_flag_set(sbi, SBI_IS_DIRTY) ||
4197 !is_set_ckpt_flags(sbi, CP_UMOUNT_FLAG)) {
4198 struct cp_control cpc = {
4199 .reason = CP_UMOUNT,
4200 };
4201 f2fs_write_checkpoint(sbi, &cpc);
4202 }
4203
4204 if (is_sbi_flag_set(sbi, SBI_IS_RECOVERED) && f2fs_readonly(sb))
4205 sb->s_flags &= ~SB_RDONLY;
4206 }
4207 kill_block_super(sb);
4208 }
4209

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#2 lore raw
In reply to Chao Yu
I love your patch! Yet something to improve:

Hi Chao,

I love your patch! Yet something to improve:

[auto build test ERROR on f2fs/dev-test]
[cannot apply to v5.13-rc1 next-20210510]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Chao-Yu/f2fs-compress-add-compress_inode-to-cache-compressed-blocks/20210510-173127
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/28d803e509b3847a31e73d7bd20b9f7b7e559471
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Chao-Yu/f2fs-compress-add-compress_inode-to-cache-compressed-blocks/20210510-173127
        git checkout 28d803e509b3847a31e73d7bd20b9f7b7e559471
        # save the attached .config to linux build tree
        make W=1 W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

fs/f2fs/super.c: In function 'kill_f2fs_super':

>> fs/f2fs/super.c:4194:31: error: implicit declaration of function 'COMPRESS_MAPPING'; did you mean 'NODE_MAPPING'? [-Werror=implicit-function-declaration]
    4194 |    truncate_inode_pages_final(COMPRESS_MAPPING(sbi));
         |                               ^~~~~~~~~~~~~~~~
         |                               NODE_MAPPING
   fs/f2fs/super.c:4194:31: warning: passing argument 1 of 'truncate_inode_pages_final' makes pointer from integer without a cast [-Wint-conversion]
    4194 |    truncate_inode_pages_final(COMPRESS_MAPPING(sbi));
         |                               ^~~~~~~~~~~~~~~~~~~~~
         |                               |
         |                               int
   In file included from include/linux/pagemap.h:8,
                    from include/linux/buffer_head.h:14,
                    from fs/f2fs/super.c:12:
   include/linux/mm.h:2625:40: note: expected 'struct address_space *' but argument is of type 'int'
    2625 | extern void truncate_inode_pages_final(struct address_space *);
         |                                        ^~~~~~~~~~~~~~~~~~~~~~

cc1: some warnings being treated as errors

vim +4194 fs/f2fs/super.c

4179
4180 static void kill_f2fs_super(struct super_block *sb)
4181 {
4182 if (sb->s_root) {
4183 struct f2fs_sb_info *sbi = F2FS_SB(sb);
4184
4185 set_sbi_flag(sbi, SBI_IS_CLOSE);
4186 f2fs_stop_gc_thread(sbi);
4187 f2fs_stop_discard_thread(sbi);
4188
4189 /*
4190 * latter evict_inode() can bypass checking and invalidating
4191 * compress inode cache.
4192 */
4193 if (test_opt(sbi, COMPRESS_CACHE))

> 4194				truncate_inode_pages_final(COMPRESS_MAPPING(sbi));

4195
4196 if (is_sbi_flag_set(sbi, SBI_IS_DIRTY) ||
4197 !is_set_ckpt_flags(sbi, CP_UMOUNT_FLAG)) {
4198 struct cp_control cpc = {
4199 .reason = CP_UMOUNT,
4200 };
4201 f2fs_write_checkpoint(sbi, &cpc);
4202 }
4203
4204 if (is_sbi_flag_set(sbi, SBI_IS_RECOVERED) && f2fs_readonly(sb))
4205 sb->s_flags &= ~SB_RDONLY;
4206 }
4207 kill_block_super(sb);
4208 }
4209

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#3 lore raw
In reply to Chao Yu
I love your patch! Yet something to improve:

Hi Chao,

I love your patch! Yet something to improve:

[auto build test ERROR on f2fs/dev-test]
[cannot apply to v5.13-rc1 next-20210510]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Chao-Yu/f2fs-compress-add-compress_inode-to-cache-compressed-blocks/20210510-173127
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
config: ia64-randconfig-r011-20210510 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/28d803e509b3847a31e73d7bd20b9f7b7e559471
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chao-Yu/f2fs-compress-add-compress_inode-to-cache-compressed-blocks/20210510-173127 git checkout 28d803e509b3847a31e73d7bd20b9f7b7e559471
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=ia64

If you fix the issue, kindly add following tag as appropriate

All error/warnings (new ones prefixed by >>):

In file included from arch/ia64/include/asm/pgtable.h:154,

                    from include/linux/pgtable.h:6,
                    from arch/ia64/include/asm/uaccess.h:40,
                    from include/linux/uaccess.h:11,
                    from include/linux/sched/task.h:11,
                    from include/linux/sched/signal.h:9,
                    from include/linux/rcuwait.h:6,
                    from include/linux/percpu-rwsem.h:7,
                    from include/linux/fs.h:33,
                    from fs/f2fs/super.c:10:
   arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
   arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
     127 |  unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
         |                                         ^~~~~~~
   fs/f2fs/super.c: In function 'kill_f2fs_super':
>> fs/f2fs/super.c:4194:31: error: implicit declaration of function 'COMPRESS_MAPPING'; did you mean 'NODE_MAPPING'? [-Werror=implicit-function-declaration]
    4194 |    truncate_inode_pages_final(COMPRESS_MAPPING(sbi));
         |                               ^~~~~~~~~~~~~~~~
         |                               NODE_MAPPING
>> fs/f2fs/super.c:4194:31: warning: passing argument 1 of 'truncate_inode_pages_final' makes pointer from integer without a cast [-Wint-conversion]
    4194 |    truncate_inode_pages_final(COMPRESS_MAPPING(sbi));
         |                               ^~~~~~~~~~~~~~~~~~~~~
         |                               |
         |                               int
   In file included from include/linux/pagemap.h:8,
                    from include/linux/buffer_head.h:14,
                    from fs/f2fs/super.c:12:
   include/linux/mm.h:2625:40: note: expected 'struct address_space *' but argument is of type 'int'
    2625 | extern void truncate_inode_pages_final(struct address_space *);
         |                                        ^~~~~~~~~~~~~~~~~~~~~~

cc1: some warnings being treated as errors

vim +4194 fs/f2fs/super.c

4179
4180 static void kill_f2fs_super(struct super_block *sb)
4181 {
4182 if (sb->s_root) {
4183 struct f2fs_sb_info *sbi = F2FS_SB(sb);
4184
4185 set_sbi_flag(sbi, SBI_IS_CLOSE);
4186 f2fs_stop_gc_thread(sbi);
4187 f2fs_stop_discard_thread(sbi);
4188
4189 /*
4190 * latter evict_inode() can bypass checking and invalidating
4191 * compress inode cache.
4192 */
4193 if (test_opt(sbi, COMPRESS_CACHE))

> 4194				truncate_inode_pages_final(COMPRESS_MAPPING(sbi));

4195
4196 if (is_sbi_flag_set(sbi, SBI_IS_DIRTY) ||
4197 !is_set_ckpt_flags(sbi, CP_UMOUNT_FLAG)) {
4198 struct cp_control cpc = {
4199 .reason = CP_UMOUNT,
4200 };
4201 f2fs_write_checkpoint(sbi, &cpc);
4202 }
4203
4204 if (is_sbi_flag_set(sbi, SBI_IS_RECOVERED) && f2fs_readonly(sb))
4205 sb->s_flags &= ~SB_RDONLY;
4206 }
4207 kill_block_super(sb);
4208 }
4209

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org