All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [xiang-linux:shrink2 4/9] fs/xfs/libxfs/xfs_ag.c:573 xfs_ag_shrink_space() warn: inconsistent indenting
Date: Thu, 21 Jan 2021 14:36:01 +0800	[thread overview]
Message-ID: <202101211456.2u74relZ-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3428 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/xiang/linux.git shrink2
head:   7532f70ea7d8c935aa884bb233757b7b32341399
commit: b9dfa8680fb5087e8333a70a3b15610006f11b34 [4/9] xfs: support shrinking unused space in the last AG
config: x86_64-randconfig-m001-20210121 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

smatch warnings:
fs/xfs/libxfs/xfs_ag.c:573 xfs_ag_shrink_space() warn: inconsistent indenting

vim +573 fs/xfs/libxfs/xfs_ag.c

   489	
   490	int
   491	xfs_ag_shrink_space(
   492		struct xfs_mount	*mp,
   493		struct xfs_trans	*tp,
   494		struct aghdr_init_data	*id,
   495		xfs_extlen_t		len)
   496	{
   497		struct xfs_alloc_arg	args = {
   498			.tp	= tp,
   499			.mp	= mp,
   500			.type	= XFS_ALLOCTYPE_THIS_BNO,
   501			.minlen = len,
   502			.maxlen = len,
   503			.oinfo	= XFS_RMAP_OINFO_SKIP_UPDATE,
   504			.resv	= XFS_AG_RESV_NONE,
   505			.prod	= 1
   506		};
   507		struct xfs_buf		*agibp, *agfbp;
   508		struct xfs_agi		*agi;
   509		struct xfs_agf		*agf;
   510		int			error, err2;
   511	
   512		ASSERT(id->agno == mp->m_sb.sb_agcount - 1);
   513		error = xfs_ialloc_read_agi(mp, tp, id->agno, &agibp);
   514		if (error)
   515			return error;
   516	
   517		agi = agibp->b_addr;
   518	
   519		error = xfs_alloc_read_agf(mp, tp, id->agno, 0, &agfbp);
   520		if (error)
   521			return error;
   522	
   523		agf = agfbp->b_addr;
   524		if (XFS_IS_CORRUPT(mp, agf->agf_length != agi->agi_length))
   525			return -EFSCORRUPTED;
   526	
   527		args.fsbno = XFS_AGB_TO_FSB(mp, id->agno,
   528					    be32_to_cpu(agi->agi_length) - len);
   529	
   530		/* remove the preallocations before allocation and re-establish then */
   531		error = xfs_ag_resv_free(agibp->b_pag);
   532		if (error)
   533			return error;
   534	
   535		/* internal log shouldn't also show up in the free space btrees */
   536		error = xfs_alloc_vextent(&args);
   537		if (!error && args.agbno == NULLAGBLOCK)
   538			error = -ENOSPC;
   539	
   540		if (error) {
   541			err2 = xfs_ag_resv_init(agibp->b_pag, tp);
   542			if (err2)
   543				goto resv_err;
   544			return error;
   545		}
   546	
   547		/*
   548		 * if successfully deleted from freespace btrees, need to confirm
   549		 * per-AG reservation works as expected.
   550		 */
   551		be32_add_cpu(&agi->agi_length, -len);
   552		be32_add_cpu(&agf->agf_length, -len);
   553	
   554		err2 = xfs_ag_resv_init(agibp->b_pag, tp);
   555		if (err2) {
   556			be32_add_cpu(&agi->agi_length, len);
   557			be32_add_cpu(&agf->agf_length, len);
   558			if (err2 != -ENOSPC)
   559				goto resv_err;
   560	
   561			__xfs_bmap_add_free(tp, args.fsbno, len,
   562					    &XFS_RMAP_OINFO_SKIP_UPDATE, true);
   563			return err2;
   564		}
   565		xfs_ialloc_log_agi(tp, agibp, XFS_AGI_LENGTH);
   566		xfs_alloc_log_agf(tp, agfbp, XFS_AGF_LENGTH);
   567		return 0;
   568	
   569	resv_err:
   570		xfs_warn(mp,
   571	"Error %d reserving per-AG metadata reserve pool.", err2);
   572			xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
 > 573		return err2;
   574	}
   575	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38405 bytes --]

                 reply	other threads:[~2021-01-21  6:36 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=202101211456.2u74relZ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.