All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [hch-xfs:xfs-zoned 79/80] fs/xfs/xfs_reflink.c:835: undefined reference to `xfs_zone_record_blocks'
Date: Fri, 26 Jan 2024 15:42:39 +0800	[thread overview]
Message-ID: <202401261517.cM7pDXKA-lkp@intel.com> (raw)

tree:   git://git.infradead.org/users/hch/xfs xfs-zoned
head:   9fc0addd2e44d48f96a00113084dfcab9b9df8f8
commit: 2fa0f6f5ec6e51a9507fe67dfe98cdd1b89958cd [79/80] xfs: add a "defrag" mode to xfs_zoned_end_cow
config: i386-randconfig-011-20240126 (https://download.01.org/0day-ci/archive/20240126/202401261517.cM7pDXKA-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240126/202401261517.cM7pDXKA-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/202401261517.cM7pDXKA-lkp@intel.com/

All errors (new ones prefixed by >>):

   ld: fs/xfs/xfs_reflink.o: in function `__xfs_reflink_end_cow_extent':
>> fs/xfs/xfs_reflink.c:835: undefined reference to `xfs_zone_record_blocks'


vim +835 fs/xfs/xfs_reflink.c

   792	
   793	static int
   794	__xfs_reflink_end_cow_extent(
   795		struct xfs_trans	*tp,
   796		struct xfs_inode	*ip,
   797		struct xfs_bmbt_irec	*cow,
   798		xfs_fsblock_t		*new_startblock,
   799		xfs_fsblock_t		old_startblock)
   800	{
   801		bool			isrt = XFS_IS_REALTIME_INODE(ip);
   802		struct xfs_bmbt_irec	data, new;
   803		int			nmaps = 1;
   804		int			error;
   805	
   806		error = xfs_iext_count_may_overflow(ip, XFS_DATA_FORK,
   807				XFS_IEXT_REFLINK_END_COW_CNT);
   808		if (error == -EFBIG)
   809			error = xfs_iext_count_upgrade(tp, ip,
   810					XFS_IEXT_REFLINK_END_COW_CNT);
   811		if (error)
   812			return error;
   813	
   814		/* Grab the corresponding mapping in the data fork. */
   815		error = xfs_bmapi_read(ip, cow->br_startoff, cow->br_blockcount, &data,
   816				       &nmaps, 0);
   817		if (error)
   818			return error;
   819	
   820		/* We can only remap the smaller of the two extent sizes. */
   821		data.br_blockcount = min(data.br_blockcount, cow->br_blockcount);
   822		cow->br_blockcount = data.br_blockcount;
   823	
   824		if (old_startblock != NULLFSBLOCK &&
   825		    data.br_startblock != old_startblock) {
   826			/*
   827			 * A data write raced with our GC write.
   828			 *
   829			 * Keep the existing data, mark our newly written GC extent as
   830			 * reclaimable and move on to the next extent.
   831			 */
   832			ASSERT(xfs_is_zoned_inode(ip));
   833			ASSERT(*new_startblock == NULLFSBLOCK);
   834			trace_xfs_reflink_cow_remap_skip(ip, cow);
 > 835			return xfs_zone_record_blocks(tp, cow->br_startblock,
   836					cow->br_blockcount, false);
   837		}
   838	
   839		trace_xfs_reflink_cow_remap_from(ip, cow);
   840		trace_xfs_reflink_cow_remap_to(ip, &data);
   841	
   842		if (xfs_bmap_is_real_extent(&data)) {
   843			/*
   844			 * If the extent we're remapping into is backed by storage
   845			 * (written or not), unmap the extent and drop its refcount.
   846			 */
   847			xfs_bmap_unmap_extent(tp, ip, XFS_DATA_FORK, &data);
   848			if (xfs_is_reflink_inode(ip)) {
   849				xfs_refcount_decrease_extent(tp, isrt, &data);
   850			} else {
   851				error = xfs_free_extent_later(tp, data.br_startblock,
   852						data.br_blockcount, NULL,
   853						XFS_AG_RESV_NONE,
   854						XFS_FREE_EXTENT_REALTIME);
   855				if (error)
   856					return error;
   857			}
   858			xfs_reflink_update_quota(tp, ip, false, -data.br_blockcount);
   859		} else if (data.br_startblock == DELAYSTARTBLOCK) {
   860			int		done;
   861	
   862			/*
   863			 * If the extent we're remapping into is a delalloc reservation,
   864			 * we can use the regular bunmapi function to release the
   865			 * incore state.  Dropping the delalloc reservation takes care
   866			 * of the quota reservation for us.
   867			 */
   868			error = xfs_bunmapi(NULL, ip, data.br_startoff,
   869					data.br_blockcount, 0, 1, &done);
   870			if (error)
   871				return error;
   872			ASSERT(done);
   873		}
   874	
   875		new = *cow;
   876		if (xfs_is_zoned_inode(ip)) {
   877			if (*new_startblock != NULLFSBLOCK) {
   878				ASSERT(isnullstartblock(new.br_startblock));
   879				ASSERT(new.br_state == XFS_EXT_NORM);
   880	
   881				new.br_startblock = *new_startblock;
   882				*new_startblock += new.br_blockcount;
   883			}
   884	
   885			error = xfs_zone_record_blocks(tp, new.br_startblock,
   886					new.br_blockcount, true);
   887			if (error)
   888				return error;
   889		} else {
   890			ASSERT(*new_startblock == NULLFSBLOCK);
   891	
   892			/* Free the CoW orphan record. */
   893			xfs_refcount_free_cow_extent(tp, isrt, cow->br_startblock,
   894						     cow->br_blockcount);
   895		}
   896	
   897		/* Map the new blocks into the data fork. */
   898		xfs_bmap_map_extent(tp, ip, XFS_DATA_FORK, &new);
   899	
   900		/* Charge this new data fork mapping to the on-disk quota. */
   901		xfs_reflink_update_quota(tp, ip, true, cow->br_blockcount);
   902		return 0;
   903	}
   904	

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

                 reply	other threads:[~2024-01-26  7:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202401261517.cM7pDXKA-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hch@lst.de \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.