All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Theodore Ts'o <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Jan Kara <jack@suse.com>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] jbd2: assign different lock_class_key for different filesystem
Date: Sun, 19 Oct 2025 21:06:59 +0800	[thread overview]
Message-ID: <202510192155.eZoaLgzE-lkp@intel.com> (raw)
In-Reply-To: <e42f1471-a88a-4938-8743-1d5b171c47ec@I-love.SAKURA.ne.jp>

Hi Tetsuo,

kernel test robot noticed the following build errors:

[auto build test ERROR on tytso-ext4/dev]
[also build test ERROR on linus/master brauner-vfs/vfs.all v6.18-rc1 next-20251017]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Tetsuo-Handa/jbd2-assign-different-lock_class_key-for-different-filesystem/20251019-185450
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
patch link:    https://lore.kernel.org/r/e42f1471-a88a-4938-8743-1d5b171c47ec%40I-love.SAKURA.ne.jp
patch subject: [PATCH] jbd2: assign different lock_class_key for different filesystem
config: arm-randconfig-002-20251019 (https://download.01.org/0day-ci/archive/20251019/202510192155.eZoaLgzE-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251019/202510192155.eZoaLgzE-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/202510192155.eZoaLgzE-lkp@intel.com/

All errors (new ones prefixed by >>):

   fs/jbd2/journal.c: In function 'journal_init_common':
>> fs/jbd2/journal.c:1553:24: error: 'EXT4_SUPER_MAGIC' undeclared (first use in this function)
    1553 |             fsmagic == EXT4_SUPER_MAGIC) {
         |                        ^~~~~~~~~~~~~~~~
   fs/jbd2/journal.c:1553:24: note: each undeclared identifier is reported only once for each function it appears in
>> fs/jbd2/journal.c:1562:31: error: 'OCFS2_SUPER_MAGIC' undeclared (first use in this function)
    1562 |                    fsmagic == OCFS2_SUPER_MAGIC) {
         |                               ^~~~~~~~~~~~~~~~~


vim +/EXT4_SUPER_MAGIC +1553 fs/jbd2/journal.c

  1508	
  1509	
  1510	/*
  1511	 * Management for journal control blocks: functions to create and
  1512	 * destroy journal_t structures, and to initialise and read existing
  1513	 * journal blocks from disk.  */
  1514	
  1515	/* The journal_init_common() function creates and fills a journal_t object
  1516	 * in memory. It calls journal_load_superblock() to load the on-disk journal
  1517	 * superblock and initialize the journal_t object.
  1518	 */
  1519	
  1520	static journal_t *journal_init_common(struct block_device *bdev, struct block_device *fs_dev,
  1521					      unsigned long long start, int len, int blocksize,
  1522					      unsigned long fsmagic)
  1523	{
  1524		static struct lock_class_key jbd2_trans_commit_key_ext4;
  1525		static struct lock_class_key jbd2_trans_commit_key_ocfs2;
  1526		static struct lock_class_key jbd2_trans_commit_key_unknown;
  1527		journal_t *journal;
  1528		int err;
  1529		int n;
  1530	
  1531		journal = kzalloc(sizeof(*journal), GFP_KERNEL);
  1532		if (!journal)
  1533			return ERR_PTR(-ENOMEM);
  1534	
  1535		journal->j_blocksize = blocksize;
  1536		journal->j_dev = bdev;
  1537		journal->j_fs_dev = fs_dev;
  1538		journal->j_blk_offset = start;
  1539		journal->j_total_len = len;
  1540		jbd2_init_fs_dev_write_error(journal);
  1541	
  1542		err = journal_load_superblock(journal);
  1543		if (err)
  1544			goto err_cleanup;
  1545	
  1546		init_waitqueue_head(&journal->j_wait_transaction_locked);
  1547		init_waitqueue_head(&journal->j_wait_done_commit);
  1548		init_waitqueue_head(&journal->j_wait_commit);
  1549		init_waitqueue_head(&journal->j_wait_updates);
  1550		init_waitqueue_head(&journal->j_wait_reserved);
  1551		init_waitqueue_head(&journal->j_fc_wait);
  1552		if (IS_ENABLED(CONFIG_LOCKDEP) && IS_ENABLED(CONFIG_EXT4_FS) &&
> 1553		    fsmagic == EXT4_SUPER_MAGIC) {
  1554			mutex_init(&journal->j_abort_mutex);
  1555			mutex_init(&journal->j_barrier);
  1556			mutex_init(&journal->j_checkpoint_mutex);
  1557			spin_lock_init(&journal->j_revoke_lock);
  1558			spin_lock_init(&journal->j_list_lock);
  1559			spin_lock_init(&journal->j_history_lock);
  1560			rwlock_init(&journal->j_state_lock);
  1561		} else if (IS_ENABLED(CONFIG_LOCKDEP) && IS_ENABLED(CONFIG_OCFS2_FS) &&
> 1562			   fsmagic == OCFS2_SUPER_MAGIC) {
  1563			mutex_init(&journal->j_abort_mutex);
  1564			mutex_init(&journal->j_barrier);
  1565			mutex_init(&journal->j_checkpoint_mutex);
  1566			spin_lock_init(&journal->j_revoke_lock);
  1567			spin_lock_init(&journal->j_list_lock);
  1568			spin_lock_init(&journal->j_history_lock);
  1569			rwlock_init(&journal->j_state_lock);
  1570		} else {
  1571			mutex_init(&journal->j_abort_mutex);
  1572			mutex_init(&journal->j_barrier);
  1573			mutex_init(&journal->j_checkpoint_mutex);
  1574			spin_lock_init(&journal->j_revoke_lock);
  1575			spin_lock_init(&journal->j_list_lock);
  1576			spin_lock_init(&journal->j_history_lock);
  1577			rwlock_init(&journal->j_state_lock);
  1578		}
  1579	
  1580		journal->j_commit_interval = (HZ * JBD2_DEFAULT_MAX_COMMIT_AGE);
  1581		journal->j_min_batch_time = 0;
  1582		journal->j_max_batch_time = 15000; /* 15ms */
  1583		atomic_set(&journal->j_reserved_credits, 0);
  1584		if (IS_ENABLED(CONFIG_LOCKDEP) && IS_ENABLED(CONFIG_EXT4_FS) &&
  1585		    fsmagic == EXT4_SUPER_MAGIC)
  1586			lockdep_init_map(&journal->j_trans_commit_map, "jbd2_handle_ext4",
  1587					 &jbd2_trans_commit_key_ext4, 0);
  1588		else if (IS_ENABLED(CONFIG_LOCKDEP) && IS_ENABLED(CONFIG_OCFS2_FS) &&
  1589			 fsmagic == OCFS2_SUPER_MAGIC)
  1590			lockdep_init_map(&journal->j_trans_commit_map, "jbd2_handle_ocfs2",
  1591					 &jbd2_trans_commit_key_ocfs2, 0);
  1592		else
  1593			lockdep_init_map(&journal->j_trans_commit_map, "jbd2_handle_unknown",
  1594					 &jbd2_trans_commit_key_unknown, 0);
  1595	
  1596		/* The journal is marked for error until we succeed with recovery! */
  1597		journal->j_flags = JBD2_ABORT;
  1598	
  1599		/* Set up a default-sized revoke table for the new mount. */
  1600		err = jbd2_journal_init_revoke(journal, JOURNAL_REVOKE_DEFAULT_HASH);
  1601		if (err)
  1602			goto err_cleanup;
  1603	
  1604		/*
  1605		 * journal descriptor can store up to n blocks, we need enough
  1606		 * buffers to write out full descriptor block.
  1607		 */
  1608		err = -ENOMEM;
  1609		n = journal->j_blocksize / jbd2_min_tag_size();
  1610		journal->j_wbufsize = n;
  1611		journal->j_fc_wbuf = NULL;
  1612		journal->j_wbuf = kmalloc_array(n, sizeof(struct buffer_head *),
  1613						GFP_KERNEL);
  1614		if (!journal->j_wbuf)
  1615			goto err_cleanup;
  1616	
  1617		err = percpu_counter_init(&journal->j_checkpoint_jh_count, 0,
  1618					  GFP_KERNEL);
  1619		if (err)
  1620			goto err_cleanup;
  1621	
  1622		journal->j_shrink_transaction = NULL;
  1623	
  1624		journal->j_shrinker = shrinker_alloc(0, "jbd2-journal:(%u:%u)",
  1625						     MAJOR(bdev->bd_dev),
  1626						     MINOR(bdev->bd_dev));
  1627		if (!journal->j_shrinker) {
  1628			err = -ENOMEM;
  1629			goto err_cleanup;
  1630		}
  1631	
  1632		journal->j_shrinker->scan_objects = jbd2_journal_shrink_scan;
  1633		journal->j_shrinker->count_objects = jbd2_journal_shrink_count;
  1634		journal->j_shrinker->private_data = journal;
  1635	
  1636		shrinker_register(journal->j_shrinker);
  1637	
  1638		return journal;
  1639	
  1640	err_cleanup:
  1641		percpu_counter_destroy(&journal->j_checkpoint_jh_count);
  1642		kfree(journal->j_wbuf);
  1643		jbd2_journal_destroy_revoke(journal);
  1644		journal_fail_superblock(journal);
  1645		kfree(journal);
  1646		return ERR_PTR(err);
  1647	}
  1648	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2025-10-19 13:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-19 10:52 [PATCH] jbd2: assign different lock_class_key for different filesystem Tetsuo Handa
2025-10-19 13:06 ` kernel test robot [this message]
2025-10-19 13:28 ` kernel test robot
2025-10-20  9:31 ` Jan Kara
2025-10-20 11:28   ` Tetsuo Handa
2025-10-20 12:55     ` Jan Kara
2025-10-21 11:16       ` Tetsuo Handa
2025-10-21 13:39         ` Jan Kara
2025-10-22 10:04           ` Tetsuo Handa
2025-10-22 10:49             ` Jan Kara
2025-10-22 11:11               ` [PATCH v2] jbd2: allocate lock_class_key for jbd2_handle dynamically Tetsuo Handa
2025-10-23  7:59                 ` Jan Kara
2025-10-31 11:28                   ` Tetsuo Handa
2025-10-31 12:42                     ` Jan Kara
2025-11-17 19:13                 ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202510192155.eZoaLgzE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=jack@suse.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.