* [bcachefs:bcachefs-testing 170/174] fs/bcachefs/btree_gc.c:1990:6: warning: variable 'ret' set but not used
@ 2023-12-17 14:29 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-12-17 14:29 UTC (permalink / raw)
To: Kent Overstreet; +Cc: llvm, oe-kbuild-all, Kent Overstreet
tree: https://evilpiepirate.org/git/bcachefs.git bcachefs-testing
head: 16609653d3eeb730d5a4b5d19266d52f9e7b8ea3
commit: 9eb1d5729fea27a8dc4cea826faa2dadda009508 [170/174] fixup! bcachefs: bch_err_(fn|msg) check if should print
config: i386-buildonly-randconfig-003-20231217 (https://download.01.org/0day-ci/archive/20231217/202312172235.bDfQqc6L-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231217/202312172235.bDfQqc6L-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312172235.bDfQqc6L-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/bcachefs/btree_gc.c:1990:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
int ret;
^
1 warning generated.
vim +/ret +1990 fs/bcachefs/btree_gc.c
451570a5bc5f72 Kent Overstreet 2020-06-15 1983
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1984 static int bch2_gc_thread(void *arg)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1985 {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1986 struct bch_fs *c = arg;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1987 struct io_clock *clock = &c->io_clock[WRITE];
2abe542087d9cb Kent Overstreet 2021-01-21 1988 unsigned long last = atomic64_read(&clock->now);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1989 unsigned last_kick = atomic_read(&c->kick_gc);
9ca53b55f74157 Kent Overstreet 2018-07-23 @1990 int ret;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1991
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1992 set_freezable();
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1993
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1994 while (1) {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1995 while (1) {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1996 set_current_state(TASK_INTERRUPTIBLE);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1997
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1998 if (kthread_should_stop()) {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 1999 __set_current_state(TASK_RUNNING);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2000 return 0;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2001 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2002
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2003 if (atomic_read(&c->kick_gc) != last_kick)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2004 break;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2005
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2006 if (c->btree_gc_periodic) {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2007 unsigned long next = last + c->capacity / 16;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2008
2abe542087d9cb Kent Overstreet 2021-01-21 2009 if (atomic64_read(&clock->now) >= next)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2010 break;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2011
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2012 bch2_io_clock_schedule_timeout(clock, next);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2013 } else {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2014 schedule();
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2015 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2016
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2017 try_to_freeze();
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2018 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2019 __set_current_state(TASK_RUNNING);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2020
2abe542087d9cb Kent Overstreet 2021-01-21 2021 last = atomic64_read(&clock->now);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2022 last_kick = atomic_read(&c->kick_gc);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2023
451570a5bc5f72 Kent Overstreet 2020-06-15 2024 /*
451570a5bc5f72 Kent Overstreet 2020-06-15 2025 * Full gc is currently incompatible with btree key cache:
451570a5bc5f72 Kent Overstreet 2020-06-15 2026 */
451570a5bc5f72 Kent Overstreet 2020-06-15 2027 #if 0
5b593ee172bd53 Kent Overstreet 2021-01-26 2028 ret = bch2_gc(c, false, false);
451570a5bc5f72 Kent Overstreet 2020-06-15 2029 #else
451570a5bc5f72 Kent Overstreet 2020-06-15 2030 ret = bch2_gc_gens(c);
451570a5bc5f72 Kent Overstreet 2020-06-15 2031 #endif
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2032 debug_check_no_locks_held();
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2033 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2034
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2035 return 0;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2036 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 2037
:::::: The code at line 1990 was first introduced by commit
:::::: 9ca53b55f7415783c6cc8b751c99f2af6cc0a932 bcachefs: gc now operates on second set of bucket marks
:::::: TO: Kent Overstreet <kent.overstreet@gmail.com>
:::::: CC: Kent Overstreet <kent.overstreet@linux.dev>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-17 14:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-17 14:29 [bcachefs:bcachefs-testing 170/174] fs/bcachefs/btree_gc.c:1990:6: warning: variable 'ret' set but not used kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox