* [linux-next:master 13597/13716] fs/bcachefs/btree_write_buffer.c:128:24: warning: unused variable 'c'
@ 2024-01-17 13:53 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-01-17 13:53 UTC (permalink / raw)
To: Kent Overstreet; +Cc: oe-kbuild-all, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 943b9f0ab2cfbaea148dd6ac279957eb08b96904
commit: 3e76edb0f4db19fca9ee02a6c163a670bc66fa2c [13597/13716] bcachefs: Prep work for variable size btree node buffers
config: x86_64-buildonly-randconfig-003-20240117 (https://download.01.org/0day-ci/archive/20240117/202401172139.XSfsNhrJ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240117/202401172139.XSfsNhrJ-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/202401172139.XSfsNhrJ-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/bcachefs/btree_write_buffer.c: In function 'wb_flush_one':
>> fs/bcachefs/btree_write_buffer.c:128:24: warning: unused variable 'c' [-Wunused-variable]
128 | struct bch_fs *c = trans->c;
| ^
vim +/c +128 fs/bcachefs/btree_write_buffer.c
ab4fb4b678c378 Kent Overstreet 2023-11-26 123
ab4fb4b678c378 Kent Overstreet 2023-11-26 124 static inline int wb_flush_one(struct btree_trans *trans, struct btree_iter *iter,
920e69bc3db88d Kent Overstreet 2023-01-04 125 struct btree_write_buffered_key *wb,
ab4fb4b678c378 Kent Overstreet 2023-11-26 126 bool *write_locked, size_t *fast)
920e69bc3db88d Kent Overstreet 2023-01-04 127 {
920e69bc3db88d Kent Overstreet 2023-01-04 @128 struct bch_fs *c = trans->c;
920e69bc3db88d Kent Overstreet 2023-01-04 129 struct btree_path *path;
920e69bc3db88d Kent Overstreet 2023-01-04 130 int ret;
920e69bc3db88d Kent Overstreet 2023-01-04 131
ab4fb4b678c378 Kent Overstreet 2023-11-26 132 EBUG_ON(!wb->journal_seq);
09caeabe1a5daa Kent Overstreet 2023-11-02 133 EBUG_ON(!c->btree_write_buffer.flushing.pin.seq);
09caeabe1a5daa Kent Overstreet 2023-11-02 134 EBUG_ON(c->btree_write_buffer.flushing.pin.seq > wb->journal_seq);
09caeabe1a5daa Kent Overstreet 2023-11-02 135
920e69bc3db88d Kent Overstreet 2023-01-04 136 ret = bch2_btree_iter_traverse(iter);
920e69bc3db88d Kent Overstreet 2023-01-04 137 if (ret)
920e69bc3db88d Kent Overstreet 2023-01-04 138 return ret;
920e69bc3db88d Kent Overstreet 2023-01-04 139
e17b93eb36729c Kent Overstreet 2023-11-07 140 /*
e17b93eb36729c Kent Overstreet 2023-11-07 141 * We can't clone a path that has write locks: unshare it now, before
e17b93eb36729c Kent Overstreet 2023-11-07 142 * set_pos and traverse():
e17b93eb36729c Kent Overstreet 2023-11-07 143 */
07f383c71fadc9 Kent Overstreet 2023-12-04 144 if (btree_iter_path(trans, iter)->ref > 1)
07f383c71fadc9 Kent Overstreet 2023-12-04 145 iter->path = __bch2_btree_path_make_mut(trans, iter->path, true, _THIS_IP_);
e17b93eb36729c Kent Overstreet 2023-11-07 146
07f383c71fadc9 Kent Overstreet 2023-12-04 147 path = btree_iter_path(trans, iter);
920e69bc3db88d Kent Overstreet 2023-01-04 148
920e69bc3db88d Kent Overstreet 2023-01-04 149 if (!*write_locked) {
920e69bc3db88d Kent Overstreet 2023-01-04 150 ret = bch2_btree_node_lock_write(trans, path, &path->l[0].b->c);
920e69bc3db88d Kent Overstreet 2023-01-04 151 if (ret)
920e69bc3db88d Kent Overstreet 2023-01-04 152 return ret;
920e69bc3db88d Kent Overstreet 2023-01-04 153
920e69bc3db88d Kent Overstreet 2023-01-04 154 bch2_btree_node_prep_for_write(trans, path, path->l[0].b);
920e69bc3db88d Kent Overstreet 2023-01-04 155 *write_locked = true;
920e69bc3db88d Kent Overstreet 2023-01-04 156 }
920e69bc3db88d Kent Overstreet 2023-01-04 157
3e76edb0f4db19 Kent Overstreet 2024-01-16 158 if (unlikely(!bch2_btree_node_insert_fits(path->l[0].b, wb->k.k.u64s))) {
920e69bc3db88d Kent Overstreet 2023-01-04 159 *write_locked = false;
ab4fb4b678c378 Kent Overstreet 2023-11-26 160 return wb_flush_one_slowpath(trans, iter, wb);
920e69bc3db88d Kent Overstreet 2023-01-04 161 }
920e69bc3db88d Kent Overstreet 2023-01-04 162
920e69bc3db88d Kent Overstreet 2023-01-04 163 bch2_btree_insert_key_leaf(trans, path, &wb->k, wb->journal_seq);
920e69bc3db88d Kent Overstreet 2023-01-04 164 (*fast)++;
920e69bc3db88d Kent Overstreet 2023-01-04 165 return 0;
920e69bc3db88d Kent Overstreet 2023-01-04 166 }
920e69bc3db88d Kent Overstreet 2023-01-04 167
:::::: The code at line 128 was first introduced by commit
:::::: 920e69bc3db88d3825c69190cafd43f0a1918d3b bcachefs: Btree write buffer
:::::: TO: Kent Overstreet <kent.overstreet@linux.dev>
:::::: 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:[~2024-01-17 13:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-17 13:53 [linux-next:master 13597/13716] fs/bcachefs/btree_write_buffer.c:128:24: warning: unused variable 'c' 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;
as well as URLs for NNTP newsgroup(s).