All of lore.kernel.org
 help / color / mirror / Atom feed
* [koverstreet-bcachefs:master 56/69] fs/bcachefs/data/move.c:899:1: warning: the frame size of 1028 bytes is larger than 1024 bytes
@ 2026-09-13 19:32 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-13 19:32 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: oe-kbuild-all

tree:   https://github.com/koverstreet/bcachefs master
head:   ca944a61e079450f82be88c91e349638c75cf4b6
commit: c1af6851c9e220767da3b72658ca5dc9a1980475 [56/69] bcachefs: opts.scrub_recent_journal_entries
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20260913/202609132143.Z99DjF0M-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260913/202609132143.Z99DjF0M-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/202609132143.Z99DjF0M-lkp@intel.com/

All warnings (new ones prefixed by >>):

   fs/bcachefs/data/move.c: In function 'bch2_scrub_journal':
>> fs/bcachefs/data/move.c:899:1: warning: the frame size of 1028 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     899 | }
         | ^


vim +899 fs/bcachefs/data/move.c

   757	
   758	int bch2_scrub_journal(struct bch_fs *c, u64 *rewind_seq)
   759	{
   760		CLASS(darray_u64, flushes)();
   761		int ret = 0;
   762	
   763		u64 last_entry_time = 0;
   764		*rewind_seq = 0;
   765	
   766		struct journal_replay **_i;
   767		struct genradix_iter radix_iter;
   768		genradix_for_each(&c->journal_entries, radix_iter, _i) {
   769			struct journal_replay *i = *_i;
   770	
   771			if (!journal_replay_ignore(i) &&
   772			    !JSET_NO_FLUSH(&i->j)) {
   773				u64 t = jset_datetime(&i->j);
   774				if (!last_entry_time)
   775					last_entry_time = t;
   776				else if (time_before64(t + c->opts.scrub_journal_max_rewind_secs, last_entry_time))
   777					break;
   778	
   779				try(darray_push(&flushes, le64_to_cpu(i->j.seq)));
   780			}
   781		}
   782	
   783		if (!flushes.nr) {
   784			bch_info(c, "%s(): No journal flushes found", __func__);
   785			return 0;
   786		}
   787	
   788		bch_info(c, "journal scrub: checking %zu flush ranges",
   789			 flushes.nr);
   790	
   791		struct bch_move_stats stats;
   792		bch2_move_stats_init(&stats, "journal_scrub");
   793	
   794		struct moving_context ctxt __cleanup(bch2_moving_ctxt_exit);
   795		bch2_moving_ctxt_init(&ctxt, c, NULL, &stats, (struct write_point_specifier) {}, false);
   796	
   797		struct btree_trans *trans = ctxt.trans;
   798		struct journal_keys *keys = &c->journal_keys;
   799	
   800		/*
   801		 * Scrub one flush range at a time, newest first. Within each range,
   802		 * fire off all reads asynchronously, then flush once to check for
   803		 * errors. Walk backwards until we find a good range — everything
   804		 * newer is tainted.
   805		 *
   806		 * Stop if we've gone further back than scrub_journal_max_rewind_secs seconds.
   807		 */
   808		unsigned nr_good = 0;
   809	
   810		for (int f = flushes.nr - 1; f > 0; f--) {
   811			u64 range_start = flushes.data[f - 1];
   812			u64 range_end   = flushes.data[f];
   813			u64 errors_before = atomic64_read(&stats.sectors_error_uncorrected);
   814			memset(&stats.devs_error_uncorrected, 0, sizeof(stats.devs_error_uncorrected));
   815			int move_ret = 0;
   816	
   817			darray_for_each(*keys, jk) {
   818				u64 seq = c->journal_entries_base_seq + jk->journal_seq_offset;
   819				struct bkey_s_c k = bkey_i_to_s_c(journal_key_k(c, jk));
   820	
   821	
   822				if (seq <= range_start || seq > range_end)
   823					continue;
   824	
   825				struct bkey_ptrs_c ptrs = bch2_bkey_ptrs_c(k);
   826				if (!ptrs.start)
   827					continue;
   828	
   829				struct bch_inode_opts io_opts;
   830				bch2_inode_opts_get(c, &io_opts, bkey_is_btree_ptr(k.k));
   831	
   832				bkey_for_each_ptr(ptrs, ptr) {
   833					struct data_update_opts data_opts = {
   834						.type		= BCH_DATA_UPDATE_scrub_no_repair,
   835						.read_flags	= BCH_READ_hard_require_read_device,
   836						.read_dev	= ptr->dev,
   837					};
   838					ret = lockrestart_do(trans, ({
   839						struct bkey_s_c k2;
   840	
   841						CLASS(btree_node_iter, iter)(trans, jk->btree_id, k.k->p, 0, jk->level,
   842									     BTREE_ITER_all_snapshots);
   843						int ret2 = bkey_err(k2 = bch2_btree_iter_peek_slot(&iter));
   844	
   845						BUG_ON(!ret2 && !bkey_and_val_eq(k, k2));
   846	
   847						ret2 ?:
   848						bch2_move_extent(&ctxt, NULL, &io_opts, &data_opts, &iter, jk->level, k);
   849					}));
   850	
   851					if (ret)
   852						move_ret = ret;
   853				}
   854			}
   855	
   856			bch2_moving_ctxt_flush_all(&ctxt);
   857	
   858			if (move_ret)
   859				bch_err(c, "journal scrub: move error %s in flush range seq %llu-%llu",
   860					bch2_err_str(move_ret),
   861					range_start + 1, range_end == U64_MAX ? range_start : range_end);
   862	
   863			bool checksum_err = atomic64_read(&stats.sectors_error_uncorrected) != errors_before;
   864	
   865			if (checksum_err) {
   866				bch2_sb_error_count(c, BCH_FSCK_ERR_device_bad_flush);
   867				CLASS(bch_log_msg, msg)(c);
   868				prt_printf(&msg.m, "journal scrub: checksum errors in flush range seq %llu-%llu, "
   869					"device(s) not honoring flush/FUA:",
   870					range_start + 1, range_end == U64_MAX ? range_start : range_end);
   871	
   872				unsigned i;
   873				for_each_set_bit(i, stats.devs_error_uncorrected.d, BCH_SB_MEMBERS_MAX) {
   874					CLASS(bch2_dev_tryget_noerror, ca)(c, i);
   875					if (ca)
   876						prt_printf(&msg.m, " %s", ca->name);
   877					else
   878						prt_printf(&msg.m, " dev%u", i);
   879				}
   880	
   881				guard(memalloc_flags)(PF_MEMALLOC_NOFS);
   882				guard(mutex)(&c->sb_lock);
   883				for_each_set_bit(i, stats.devs_error_uncorrected.d, BCH_SB_MEMBERS_MAX) {
   884					struct bch_member *m = bch2_members_v2_get_mut(c->disk_sb.sb, i);
   885					if (m)
   886						le64_add_cpu(&m->flush_errors, 1);
   887				}
   888				bch2_write_super(c);
   889	
   890				*rewind_seq = range_start;
   891				nr_good = 0;
   892			} else if (++nr_good >= 2) {
   893				/* Two consecutive good ranges — safe to stop */
   894				break;
   895			}
   896		}
   897	
   898		return 0;
 > 899	}
   900	

--
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:[~2026-09-13 19:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-13 19:32 [koverstreet-bcachefs:master 56/69] fs/bcachefs/data/move.c:899:1: warning: the frame size of 1028 bytes is larger than 1024 bytes kernel test robot

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.