linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	david@fromorbit.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: unset MS_ACTIVE if mount fails
Date: Mon, 17 Oct 2016 23:50:14 -0700	[thread overview]
Message-ID: <20161018065014.GA10999@infradead.org> (raw)
In-Reply-To: <20161018053849.GG26485@birch.djwong.org>

On Mon, Oct 17, 2016 at 10:38:49PM -0700, Darrick J. Wong wrote:
> In a way, yes.  We don't need to keep it on the LRU necessarily, we
> just need it not to think "Oh, this inode has i_nlink == 0 so we can
> truncate all the blocks and free the inode" prior to the end of bmap
> intent processing.
> 
> > I'd really prefer if we could just do it in our own ->drop_inode call
> > then instead of messing with MS_ACTIVE.
> 
> The difficulty here is that without MS_ACTIVE, the vfs will always
> evict the inode when i_count == 0.  I suppose bmap intent processing
> could bump up i_count and stash the inode somewhere to prevent the
> i_count from hitting zero until after we're done recovering the log...
> ...but otherwise I'm sorta stumped about how to do that.

Let me try to understand the issue here.

We get a final iput for an inode that recover once i_count hits zero.
We then want to hit the "if (!drop && (sb->s_flags & MS_ACTIVE)) {"
conditional there to add it to the lru, or at least not truncate it.
I guess for now we'll need MS_ACTIVE early here, yes.

So reluctantly:

Reviewed-by: Christoph Hellwig <hch@lst.de>

      reply	other threads:[~2016-10-18  6:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18  1:10 [PATCH] xfs: unset MS_ACTIVE if mount fails Darrick J. Wong
2016-10-18  5:24 ` Christoph Hellwig
2016-10-18  5:38   ` Darrick J. Wong
2016-10-18  6:50     ` Christoph Hellwig [this message]

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=20161018065014.GA10999@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).