All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Guo Xuenan <guoxuenan@huawei.com>,
	dchinner@redhat.com, linux-xfs@vger.kernel.org,
	sandeen@redhat.com, guoxuenan@huaweicloud.com,
	houtao1@huawei.com, fangwei1@huawei.com, jack.qiu@huawei.com,
	yi.zhang@huawei.com
Subject: Re: [PATCH 1/3] xfs: fix leak memory when xfs_attr_inactive fails
Date: Sat, 22 Apr 2023 06:54:23 +1000	[thread overview]
Message-ID: <20230421205423.GF3223426@dread.disaster.area> (raw)
In-Reply-To: <20230421153216.GI360889@frogsfrogsfrogs>

On Fri, Apr 21, 2023 at 08:32:16AM -0700, Darrick J. Wong wrote:
> On Fri, Apr 21, 2023 at 05:49:32PM +1000, Dave Chinner wrote:
> > Yes, I agree the way xfs_inactive() and inodegc handles errors and
> > cleanup needs improvement, but we've known this for a while now. But
> > this doesn't change the fact that we currently need to be able to
> > leak resources we can't access so we can continue to operate. It's
> > fine for ASSERTs to fire on debug kernels in these situations - as
> > developers we need to understand when these situations occur - but
> > that doesn't mean the behaviour they are warning about needs to be
> > fixed. It's just telling us that we are leaking stuff, it just
> > doesn't know why.
> 
> ...and should probably be logging the fact that the bad inode was
> dropped on the floor and the sysadmin should go run a fsck tool of some
> kind to fix the problems.

Runtime corruption detection at the point of error injection already
warns via the XFS_IS_CORRUPT() macro:

	if (XFS_IS_CORRUPT(mp, !xfs_ifork_has_extents(ifp)) ||
	    XFS_TEST_ERROR(false, mp, XFS_ERRTAG_BMAPIFORMAT))
		return -EFSCORRUPTED;

> > We have be waiting on having fine grained health infomration for
> > inodes to be able to handle situations like this more gracefully.
> > That code is being merged in 6.4, and it means that we know the
> 
> It is?
> 
> I didn't send you a pull request for
> https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/log/?h=indirect-health-reporting
> 
> for 6.4.  At some point I want to talk to you about the rest of online
> fsck, but I'm taking a breather for the last week or two until LSFMM.

Oops, I'm getting ahead of myself, aren't I? I was looking at a
local review branch that has everything merged in, not the for-next
branch I thought I was looking at...

-Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2023-04-21 20:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  3:31 [PATCH 0/3] xfs fixes and clean up Guo Xuenan
2023-04-21  3:31 ` [PATCH 1/3] xfs: fix leak memory when xfs_attr_inactive fails Guo Xuenan
2023-04-21  7:49   ` Dave Chinner
2023-04-21 15:32     ` Darrick J. Wong
2023-04-21 20:54       ` Dave Chinner [this message]
2023-05-05  8:16   ` kernel test robot
2023-05-05 11:27     ` Guo Xuenan
2023-04-21  3:31 ` [PATCH 2/3] xfs: fix xfs print level wrong parsing Guo Xuenan
2023-04-21  6:17   ` Dave Chinner
2023-04-21  7:01     ` Guo Xuenan
2023-04-21  3:31 ` [PATCH 3/3] xfs: clean up some unnecessary xfs_stack_trace Guo Xuenan
2023-04-21  6:18   ` Dave Chinner
2023-04-21  3:50 ` [PATCH 1/3] xfs: fix leak memory when xfs_attr_inactive fails Guo Xuenan

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=20230421205423.GF3223426@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=dchinner@redhat.com \
    --cc=djwong@kernel.org \
    --cc=fangwei1@huawei.com \
    --cc=guoxuenan@huawei.com \
    --cc=guoxuenan@huaweicloud.com \
    --cc=houtao1@huawei.com \
    --cc=jack.qiu@huawei.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=yi.zhang@huawei.com \
    /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.