* Re: [f2fs-dev] [linux-next:master 2106/4407] fs/f2fs/super.c:470:12: warning: unused function 'f2fs_compress_set_level'
[not found] <202101191726.YGvRr4k5-lkp@intel.com>
@ 2021-01-22 9:56 ` Chao Yu
0 siblings, 0 replies; only message in thread
From: Chao Yu @ 2021-01-22 9:56 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-f2fs-devel
Jaegeuk,
I've fix this compile warning due to c08e95fc6466 ("f2fs: compress: support compress level")
However the fix will conflict with
("f2fs: compress: deny setting unsupported compress algorithm")
So I rebase these two patches to 03a9a1a64a11 ("f2fs: relocate f2fs_precache_extents()")
with reversed order as below, please apply them with the right order:
1. 03a9a1a64a11 ("f2fs: relocate f2fs_precache_extents()")
2. [PATCH v3] f2fs: compress: deny setting unsupported compress algorithm
3. [PATCH v3] f2fs: compress: support compress level
On 2021/1/19 17:01, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: b4bb878f3eb3e604ebfe83bbc17eb7af8d99cbf4
> commit: ec0d0eb347b05377ad2e03c51cb1d08d6ed35619 [2106/4407] f2fs: compress: deny setting unsupported compress algorithm
> config: mips-randconfig-r033-20210119 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 22b68440e1647e16b5ee24b924986207173c02d1)
> 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 mips cross compiling tool for clang build
> # apt-get install binutils-mips-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ec0d0eb347b05377ad2e03c51cb1d08d6ed35619
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout ec0d0eb347b05377ad2e03c51cb1d08d6ed35619
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
>>> fs/f2fs/super.c:470:12: warning: unused function 'f2fs_compress_set_level'
> static int f2fs_compress_set_level(struct f2fs_sb_info const char
> ^
> fatal error: error in backend: Nested variants found in inline asm string: ' .set push
> .set mips64r2
> .if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/bitops.h", .line = 105, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
> 1: ll $0, $1
> or $0, $2
> sc $0, $1
> beqz $0, 1b
> .set pop
> '
> clang-12: error: clang frontend command failed with exit code 70 (use -v to see invocation)
> clang version 12.0.0 (git://gitmirror/llvm_project 22b68440e1647e16b5ee24b924986207173c02d1)
> Target: mipsel-unknown-linux-gnu
> Thread model: posix
> InstalledDir: /opt/cross/clang-22b68440e1/bin
> clang-12: note: diagnostic msg:
> Makefile arch fs include kernel scripts source usr
>
>
> vim +/f2fs_compress_set_level +470 fs/f2fs/super.c
>
> ed318a6cc0b62044 Eric Biggers 2020-05-12 468
> 0ba061b9e957791e Chao Yu 2020-12-09 469 #ifdef CONFIG_F2FS_FS_COMPRESSION
> 0ba061b9e957791e Chao Yu 2020-12-09 @470 static int f2fs_compress_set_level(struct f2fs_sb_info *sbi, const char *str,
> 0ba061b9e957791e Chao Yu 2020-12-09 471 int type)
> 0ba061b9e957791e Chao Yu 2020-12-09 472 {
> 0ba061b9e957791e Chao Yu 2020-12-09 473 unsigned int level;
> 0ba061b9e957791e Chao Yu 2020-12-09 474 int len;
> 0ba061b9e957791e Chao Yu 2020-12-09 475
> 0ba061b9e957791e Chao Yu 2020-12-09 476 if (type == COMPRESS_LZ4)
> 0ba061b9e957791e Chao Yu 2020-12-09 477 len = 3;
> 0ba061b9e957791e Chao Yu 2020-12-09 478 else if (type == COMPRESS_ZSTD)
> 0ba061b9e957791e Chao Yu 2020-12-09 479 len = 4;
> 0ba061b9e957791e Chao Yu 2020-12-09 480 else
> 0ba061b9e957791e Chao Yu 2020-12-09 481 return 0;
> 0ba061b9e957791e Chao Yu 2020-12-09 482
> 0ba061b9e957791e Chao Yu 2020-12-09 483 if (strlen(str) == len)
> 0ba061b9e957791e Chao Yu 2020-12-09 484 return 0;
> 0ba061b9e957791e Chao Yu 2020-12-09 485
> 0ba061b9e957791e Chao Yu 2020-12-09 486 str += len;
> 0ba061b9e957791e Chao Yu 2020-12-09 487
> 0ba061b9e957791e Chao Yu 2020-12-09 488 if (str[0] != ':') {
> 0ba061b9e957791e Chao Yu 2020-12-09 489 f2fs_info(sbi, "wrong format, e.g. <alg_name>:<compr_level>");
> 0ba061b9e957791e Chao Yu 2020-12-09 490 return -EINVAL;
> 0ba061b9e957791e Chao Yu 2020-12-09 491 }
> 0ba061b9e957791e Chao Yu 2020-12-09 492 if (kstrtouint(str + 1, 10, &level))
> 0ba061b9e957791e Chao Yu 2020-12-09 493 return -EINVAL;
> 0ba061b9e957791e Chao Yu 2020-12-09 494 if (type == COMPRESS_LZ4) {
> 0ba061b9e957791e Chao Yu 2020-12-09 495 #ifdef CONFIG_F2FS_FS_LZ4HC
> 0ba061b9e957791e Chao Yu 2020-12-09 496 if (level < LZ4HC_MIN_CLEVEL || level > LZ4HC_MAX_CLEVEL) {
> 0ba061b9e957791e Chao Yu 2020-12-09 497 f2fs_info(sbi, "invalid lz4hc compress level: %d", level);
> 0ba061b9e957791e Chao Yu 2020-12-09 498 return -EINVAL;
> 0ba061b9e957791e Chao Yu 2020-12-09 499 }
> 0ba061b9e957791e Chao Yu 2020-12-09 500 #else
> 0ba061b9e957791e Chao Yu 2020-12-09 501 f2fs_info(sbi, "doesn't support lz4hc compression");
> 0ba061b9e957791e Chao Yu 2020-12-09 502 return 0;
> 0ba061b9e957791e Chao Yu 2020-12-09 503 #endif
> 0ba061b9e957791e Chao Yu 2020-12-09 504 } else if (type == COMPRESS_ZSTD) {
> 0ba061b9e957791e Chao Yu 2020-12-09 505 #ifdef CONFIG_F2FS_FS_ZSTD
> 0ba061b9e957791e Chao Yu 2020-12-09 506 if (!level || level > ZSTD_maxCLevel()) {
> 0ba061b9e957791e Chao Yu 2020-12-09 507 f2fs_info(sbi, "invalid zstd compress level: %d", level);
> 0ba061b9e957791e Chao Yu 2020-12-09 508 return -EINVAL;
> 0ba061b9e957791e Chao Yu 2020-12-09 509 }
> 0ba061b9e957791e Chao Yu 2020-12-09 510 #else
> 0ba061b9e957791e Chao Yu 2020-12-09 511 f2fs_info(sbi, "doesn't support zstd compression");
> 0ba061b9e957791e Chao Yu 2020-12-09 512 #endif
> 0ba061b9e957791e Chao Yu 2020-12-09 513 }
> 0ba061b9e957791e Chao Yu 2020-12-09 514 F2FS_OPTION(sbi).compress_level = level;
> 0ba061b9e957791e Chao Yu 2020-12-09 515 return 0;
> 0ba061b9e957791e Chao Yu 2020-12-09 516 }
> 0ba061b9e957791e Chao Yu 2020-12-09 517 #endif
> 0ba061b9e957791e Chao Yu 2020-12-09 518
>
> :::::: The code at line 470 was first introduced by commit
> :::::: 0ba061b9e957791e8120b6acb589a26fa7bbbb53 f2fs: compress: support compress level
>
> :::::: TO: Chao Yu <yuchao0@huawei.com>
> :::::: CC: Jaegeuk Kim <jaegeuk@kernel.org>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
_______________________________________________
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] only message in thread
only message in thread, other threads:[~2021-01-22 9:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202101191726.YGvRr4k5-lkp@intel.com>
2021-01-22 9:56 ` [f2fs-dev] [linux-next:master 2106/4407] fs/f2fs/super.c:470:12: warning: unused function 'f2fs_compress_set_level' 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).