All of lore.kernel.org
 help / color / mirror / Atom feed
* [ceph-client:testing 27/33] fs/ceph/mds_client.c:1570:1: warning: the frame size of 1336 bytes is larger than 1280 bytes
@ 2026-09-07 17:27 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-07 17:27 UTC (permalink / raw)
  To: Alex Markuze; +Cc: oe-kbuild-all, ceph-devel

tree:   https://github.com/ceph/ceph-client.git testing
head:   190736464f4572bfb360fd3747fb827493e02e09
commit: 27901d0a65af9fd24268a3bcbaaee2ec8dc3366d [27/33] ceph: switch MDS request plumbing to struct ceph_journal_info
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20260908/202609080111.BlLtlFth-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260908/202609080111.BlLtlFth-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/202609080111.BlLtlFth-lkp@intel.com/

All warnings (new ones prefixed by >>):

   fs/ceph/mds_client.c: In function '__choose_mds':
>> fs/ceph/mds_client.c:1570:1: warning: the frame size of 1336 bytes is larger than 1280 bytes [-Wframe-larger-than=]
    1570 | }
         | ^


vim +1570 fs/ceph/mds_client.c

30c71233a1d4b5 Jeff Layton    2016-12-15  1408  
2f2dc053404feb Sage Weil      2009-10-06  1409  /*
2f2dc053404feb Sage Weil      2009-10-06  1410   * Choose mds to send request to next.  If there is a hint set in the
2f2dc053404feb Sage Weil      2009-10-06  1411   * request (e.g., due to a prior forward hint from the mds), use that.
2f2dc053404feb Sage Weil      2009-10-06  1412   * Otherwise, consult frag tree and/or caps to identify the
2f2dc053404feb Sage Weil      2009-10-06  1413   * appropriate mds.  If all else fails, choose randomly.
2f2dc053404feb Sage Weil      2009-10-06  1414   *
2f2dc053404feb Sage Weil      2009-10-06  1415   * Called under mdsc->mutex.
2f2dc053404feb Sage Weil      2009-10-06  1416   */
2f2dc053404feb Sage Weil      2009-10-06  1417  static int __choose_mds(struct ceph_mds_client *mdsc,
c4853e9776caef Xiubo Li       2019-12-09  1418  			struct ceph_mds_request *req,
c4853e9776caef Xiubo Li       2019-12-09  1419  			bool *random)
2f2dc053404feb Sage Weil      2009-10-06  1420  {
2f2dc053404feb Sage Weil      2009-10-06  1421  	struct inode *inode;
2f2dc053404feb Sage Weil      2009-10-06  1422  	struct ceph_inode_info *ci;
2f2dc053404feb Sage Weil      2009-10-06  1423  	struct ceph_cap *cap;
2f2dc053404feb Sage Weil      2009-10-06  1424  	int mode = req->r_direct_mode;
2f2dc053404feb Sage Weil      2009-10-06  1425  	int mds = -1;
2f2dc053404feb Sage Weil      2009-10-06  1426  	u32 hash = req->r_direct_hash;
bc2de10dc4da50 Jeff Layton    2017-02-01  1427  	bool is_hash = test_bit(CEPH_MDS_R_DIRECT_IS_HASH, &req->r_req_flags);
38d46409c4639a Xiubo Li       2023-06-12  1428  	struct ceph_client *cl = mdsc->fsc->client;
2f2dc053404feb Sage Weil      2009-10-06  1429  
c4853e9776caef Xiubo Li       2019-12-09  1430  	if (random)
c4853e9776caef Xiubo Li       2019-12-09  1431  		*random = false;
c4853e9776caef Xiubo Li       2019-12-09  1432  
2f2dc053404feb Sage Weil      2009-10-06  1433  	/*
2f2dc053404feb Sage Weil      2009-10-06  1434  	 * is there a specific mds we should try?  ignore hint if we have
2f2dc053404feb Sage Weil      2009-10-06  1435  	 * no session and the mds is not up (active or recovering).
2f2dc053404feb Sage Weil      2009-10-06  1436  	 */
2f2dc053404feb Sage Weil      2009-10-06  1437  	if (req->r_resend_mds >= 0 &&
2f2dc053404feb Sage Weil      2009-10-06  1438  	    (__have_session(mdsc, req->r_resend_mds) ||
2f2dc053404feb Sage Weil      2009-10-06  1439  	     ceph_mdsmap_get_state(mdsc->mdsmap, req->r_resend_mds) > 0)) {
27901d0a65af9f Alex Markuze   2026-08-20  1440  		boutc(cl, "using resend_mds mds%d\n", req->r_resend_mds);
2f2dc053404feb Sage Weil      2009-10-06  1441  		return req->r_resend_mds;
2f2dc053404feb Sage Weil      2009-10-06  1442  	}
2f2dc053404feb Sage Weil      2009-10-06  1443  
2f2dc053404feb Sage Weil      2009-10-06  1444  	if (mode == USE_RANDOM_MDS)
2f2dc053404feb Sage Weil      2009-10-06  1445  		goto random;
2f2dc053404feb Sage Weil      2009-10-06  1446  
2f2dc053404feb Sage Weil      2009-10-06  1447  	inode = NULL;
2f2dc053404feb Sage Weil      2009-10-06  1448  	if (req->r_inode) {
5d37ca1480a70f Yan, Zheng     2017-07-26  1449  		if (ceph_snap(req->r_inode) != CEPH_SNAPDIR) {
2f2dc053404feb Sage Weil      2009-10-06  1450  			inode = req->r_inode;
30c71233a1d4b5 Jeff Layton    2016-12-15  1451  			ihold(inode);
5d37ca1480a70f Yan, Zheng     2017-07-26  1452  		} else {
38f340ccdf9ed5 Yan, Zheng     2017-09-22  1453  			/* req->r_dentry is non-null for LSSNAP request */
38f340ccdf9ed5 Yan, Zheng     2017-09-22  1454  			rcu_read_lock();
38f340ccdf9ed5 Yan, Zheng     2017-09-22  1455  			inode = get_nonsnap_parent(req->r_dentry);
38f340ccdf9ed5 Yan, Zheng     2017-09-22  1456  			rcu_read_unlock();
27901d0a65af9f Alex Markuze   2026-08-20  1457  			boutc(cl, "using snapdir's parent %p %llx.%llx\n",
38d46409c4639a Xiubo Li       2023-06-12  1458  			      inode, ceph_vinop(inode));
5d37ca1480a70f Yan, Zheng     2017-07-26  1459  		}
38f340ccdf9ed5 Yan, Zheng     2017-09-22  1460  	} else if (req->r_dentry) {
d79698da32b317 Sage Weil      2011-07-26  1461  		/* ignore race with rename; old or new d_parent is okay */
30c71233a1d4b5 Jeff Layton    2016-12-15  1462  		struct dentry *parent;
30c71233a1d4b5 Jeff Layton    2016-12-15  1463  		struct inode *dir;
eb6bb1c5bdc6e4 Sage Weil      2010-08-16  1464  
30c71233a1d4b5 Jeff Layton    2016-12-15  1465  		rcu_read_lock();
41883ba8ee91af Yan, Zheng     2019-05-23  1466  		parent = READ_ONCE(req->r_dentry->d_parent);
3dd69aabcef3d8 Jeff Layton    2017-01-31  1467  		dir = req->r_parent ? : d_inode_rcu(parent);
30c71233a1d4b5 Jeff Layton    2016-12-15  1468  
30c71233a1d4b5 Jeff Layton    2016-12-15  1469  		if (!dir || dir->i_sb != mdsc->fsc->sb) {
30c71233a1d4b5 Jeff Layton    2016-12-15  1470  			/*  not this fs or parent went negative */
2b0143b5c986be David Howells  2015-03-17  1471  			inode = d_inode(req->r_dentry);
30c71233a1d4b5 Jeff Layton    2016-12-15  1472  			if (inode)
30c71233a1d4b5 Jeff Layton    2016-12-15  1473  				ihold(inode);
ccb36aa1b70369 Max Kellermann 2026-08-24  1474  		} else if (ceph_in_snap(dir)) {
eb6bb1c5bdc6e4 Sage Weil      2010-08-16  1475  			/* direct snapped/virtual snapdir requests
eb6bb1c5bdc6e4 Sage Weil      2010-08-16  1476  			 * based on parent dir inode */
30c71233a1d4b5 Jeff Layton    2016-12-15  1477  			inode = get_nonsnap_parent(parent);
27901d0a65af9f Alex Markuze   2026-08-20  1478  			boutc(cl, "using nonsnap parent %p %llx.%llx\n",
38d46409c4639a Xiubo Li       2023-06-12  1479  			      inode, ceph_vinop(inode));
ca18bede048e95 Yan, Zheng     2013-11-22  1480  		} else {
eb6bb1c5bdc6e4 Sage Weil      2010-08-16  1481  			/* dentry target */
2b0143b5c986be David Howells  2015-03-17  1482  			inode = d_inode(req->r_dentry);
ca18bede048e95 Yan, Zheng     2013-11-22  1483  			if (!inode || mode == USE_AUTH_MDS) {
eb6bb1c5bdc6e4 Sage Weil      2010-08-16  1484  				/* dir + name */
30c71233a1d4b5 Jeff Layton    2016-12-15  1485  				inode = igrab(dir);
e5f86dc377e7ff Sage Weil      2011-07-26  1486  				hash = ceph_dentry_hash(dir, req->r_dentry);
2f2dc053404feb Sage Weil      2009-10-06  1487  				is_hash = true;
30c71233a1d4b5 Jeff Layton    2016-12-15  1488  			} else {
30c71233a1d4b5 Jeff Layton    2016-12-15  1489  				ihold(inode);
2f2dc053404feb Sage Weil      2009-10-06  1490  			}
2f2dc053404feb Sage Weil      2009-10-06  1491  		}
30c71233a1d4b5 Jeff Layton    2016-12-15  1492  		rcu_read_unlock();
ca18bede048e95 Yan, Zheng     2013-11-22  1493  	}
eb6bb1c5bdc6e4 Sage Weil      2010-08-16  1494  
2f2dc053404feb Sage Weil      2009-10-06  1495  	if (!inode)
2f2dc053404feb Sage Weil      2009-10-06  1496  		goto random;
38d46409c4639a Xiubo Li       2023-06-12  1497  
27901d0a65af9f Alex Markuze   2026-08-20  1498  	boutc(cl, "%p %llx.%llx is_hash=%d (0x%x) mode %d\n", inode,
38d46409c4639a Xiubo Li       2023-06-12  1499  	      ceph_vinop(inode), (int)is_hash, hash, mode);
2f2dc053404feb Sage Weil      2009-10-06  1500  	ci = ceph_inode(inode);
2f2dc053404feb Sage Weil      2009-10-06  1501  
2f2dc053404feb Sage Weil      2009-10-06  1502  	if (is_hash && S_ISDIR(inode->i_mode)) {
2f2dc053404feb Sage Weil      2009-10-06  1503  		struct ceph_inode_frag frag;
2f2dc053404feb Sage Weil      2009-10-06  1504  		int found;
2f2dc053404feb Sage Weil      2009-10-06  1505  
2f2dc053404feb Sage Weil      2009-10-06  1506  		ceph_choose_frag(ci, hash, &frag, &found);
2f2dc053404feb Sage Weil      2009-10-06  1507  		if (found) {
2f2dc053404feb Sage Weil      2009-10-06  1508  			if (mode == USE_ANY_MDS && frag.ndist > 0) {
2f2dc053404feb Sage Weil      2009-10-06  1509  				u8 r;
2f2dc053404feb Sage Weil      2009-10-06  1510  
2f2dc053404feb Sage Weil      2009-10-06  1511  				/* choose a random replica */
2f2dc053404feb Sage Weil      2009-10-06  1512  				get_random_bytes(&r, 1);
2f2dc053404feb Sage Weil      2009-10-06  1513  				r %= frag.ndist;
2f2dc053404feb Sage Weil      2009-10-06  1514  				mds = frag.dist[r];
27901d0a65af9f Alex Markuze   2026-08-20  1515  				boutc(cl, "%p %llx.%llx frag %u mds%d (%d/%d)\n",
38d46409c4639a Xiubo Li       2023-06-12  1516  				      inode, ceph_vinop(inode), frag.frag,
38d46409c4639a Xiubo Li       2023-06-12  1517  				      mds, (int)r, frag.ndist);
d66bbd441c08fe Sage Weil      2011-01-21  1518  				if (ceph_mdsmap_get_state(mdsc->mdsmap, mds) >=
5d47648fe95412 Xiubo Li       2019-11-26  1519  				    CEPH_MDS_STATE_ACTIVE &&
5d47648fe95412 Xiubo Li       2019-11-26  1520  				    !ceph_mdsmap_is_laggy(mdsc->mdsmap, mds))
30c71233a1d4b5 Jeff Layton    2016-12-15  1521  					goto out;
2f2dc053404feb Sage Weil      2009-10-06  1522  			}
2f2dc053404feb Sage Weil      2009-10-06  1523  
2f2dc053404feb Sage Weil      2009-10-06  1524  			/* since this file/dir wasn't known to be
2f2dc053404feb Sage Weil      2009-10-06  1525  			 * replicated, then we want to look for the
2f2dc053404feb Sage Weil      2009-10-06  1526  			 * authoritative mds. */
2f2dc053404feb Sage Weil      2009-10-06  1527  			if (frag.mds >= 0) {
2f2dc053404feb Sage Weil      2009-10-06  1528  				/* choose auth mds */
2f2dc053404feb Sage Weil      2009-10-06  1529  				mds = frag.mds;
27901d0a65af9f Alex Markuze   2026-08-20  1530  				boutc(cl, "%p %llx.%llx frag %u mds%d (auth)\n",
38d46409c4639a Xiubo Li       2023-06-12  1531  				      inode, ceph_vinop(inode), frag.frag, mds);
d66bbd441c08fe Sage Weil      2011-01-21  1532  				if (ceph_mdsmap_get_state(mdsc->mdsmap, mds) >=
5d47648fe95412 Xiubo Li       2019-11-26  1533  				    CEPH_MDS_STATE_ACTIVE) {
224c7b6778fe08 Yanhu Cao      2020-07-31  1534  					if (!ceph_mdsmap_is_laggy(mdsc->mdsmap,
5d47648fe95412 Xiubo Li       2019-11-26  1535  								  mds))
30c71233a1d4b5 Jeff Layton    2016-12-15  1536  						goto out;
2f2dc053404feb Sage Weil      2009-10-06  1537  				}
2f2dc053404feb Sage Weil      2009-10-06  1538  			}
5d47648fe95412 Xiubo Li       2019-11-26  1539  			mode = USE_AUTH_MDS;
5d47648fe95412 Xiubo Li       2019-11-26  1540  		}
2f2dc053404feb Sage Weil      2009-10-06  1541  	}
2f2dc053404feb Sage Weil      2009-10-06  1542  
be655596b3de58 Sage Weil      2011-11-30  1543  	spin_lock(&ci->i_ceph_lock);
2f2dc053404feb Sage Weil      2009-10-06  1544  	cap = NULL;
2f2dc053404feb Sage Weil      2009-10-06  1545  	if (mode == USE_AUTH_MDS)
2f2dc053404feb Sage Weil      2009-10-06  1546  		cap = ci->i_auth_cap;
2f2dc053404feb Sage Weil      2009-10-06  1547  	if (!cap && !RB_EMPTY_ROOT(&ci->i_caps))
2f2dc053404feb Sage Weil      2009-10-06  1548  		cap = rb_entry(rb_first(&ci->i_caps), struct ceph_cap, ci_node);
2f2dc053404feb Sage Weil      2009-10-06  1549  	if (!cap) {
be655596b3de58 Sage Weil      2011-11-30  1550  		spin_unlock(&ci->i_ceph_lock);
23c2c76ead541b Jeff Layton    2021-06-04  1551  		iput(inode);
2f2dc053404feb Sage Weil      2009-10-06  1552  		goto random;
2f2dc053404feb Sage Weil      2009-10-06  1553  	}
2f2dc053404feb Sage Weil      2009-10-06  1554  	mds = cap->session->s_mds;
27901d0a65af9f Alex Markuze   2026-08-20  1555  	boutc(cl, "%p %llx.%llx mds%d (%scap %p)\n", inode,
38d46409c4639a Xiubo Li       2023-06-12  1556  	      ceph_vinop(inode), mds,
2f2dc053404feb Sage Weil      2009-10-06  1557  	      cap == ci->i_auth_cap ? "auth " : "", cap);
be655596b3de58 Sage Weil      2011-11-30  1558  	spin_unlock(&ci->i_ceph_lock);
30c71233a1d4b5 Jeff Layton    2016-12-15  1559  out:
23c2c76ead541b Jeff Layton    2021-06-04  1560  	iput(inode);
2f2dc053404feb Sage Weil      2009-10-06  1561  	return mds;
2f2dc053404feb Sage Weil      2009-10-06  1562  
2f2dc053404feb Sage Weil      2009-10-06  1563  random:
c4853e9776caef Xiubo Li       2019-12-09  1564  	if (random)
c4853e9776caef Xiubo Li       2019-12-09  1565  		*random = true;
c4853e9776caef Xiubo Li       2019-12-09  1566  
2f2dc053404feb Sage Weil      2009-10-06  1567  	mds = ceph_mdsmap_get_random_mds(mdsc->mdsmap);
27901d0a65af9f Alex Markuze   2026-08-20  1568  	boutc(cl, "chose random mds%d\n", mds);
2f2dc053404feb Sage Weil      2009-10-06  1569  	return mds;
2f2dc053404feb Sage Weil      2009-10-06 @1570  }
2f2dc053404feb Sage Weil      2009-10-06  1571  

:::::: The code at line 1570 was first introduced by commit
:::::: 2f2dc053404febedc9c273452d9d518fb31fde72 ceph: MDS client

:::::: TO: Sage Weil <sage@newdream.net>
:::::: CC: Sage Weil <sage@newdream.net>

--
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-07 17:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 17:27 [ceph-client:testing 27/33] fs/ceph/mds_client.c:1570:1: warning: the frame size of 1336 bytes is larger than 1280 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.