From: Christoph Hellwig <hch@infradead.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: viro@ZenIV.linux.org.uk, hch@infradead.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
jack@suse.cz, akpm@linux-foundation.org,
toshi.okajima@jp.fujitsu.com, mszeredi@suse.cz
Subject: Re: [PATCH 3/4] vfs: count unlinked inodes
Date: Mon, 21 Nov 2011 06:34:16 -0500 [thread overview]
Message-ID: <20111121113416.GA18087@infradead.org> (raw)
In-Reply-To: <1321873893-4544-4-git-send-email-miklos@szeredi.hu>
On Mon, Nov 21, 2011 at 12:11:32PM +0100, Miklos Szeredi wrote:
> Do not WARN_ON if set_nlink is called with zero count, just do a
> ratelimited printk. This happens on xfs and probably other
> filesystems after an unclean shutdown when the filesystem reads inodes
> which already have zero i_nlink. Reported by Christoph Hellwig.
Given that this is part of the normal recovery process printing anything
seems like a bad idea. I also don't think the code for this actually
is correct.
Remember when a filesystem recovery from unlinked but open inodes the
following happens:
- we walk the list of unlinked but open inodes, and read them into
memory, remove the linkage and then iput it.
With the current code that won't ever increment s_remove_count, but
decrement it from __destroy_inode. I suspect the right fix is to
simply not warn for a set_nlink to zero, but rather simply increment
s_remove_count for that case.
next prev parent reply other threads:[~2011-11-21 11:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-21 11:11 [PATCH 0/4] read-only remount race fix v10 Miklos Szeredi
2011-11-21 11:11 ` [PATCH 1/4] vfs: keep list of mounts for each superblock Miklos Szeredi
2011-11-21 11:11 ` [PATCH 2/4] vfs: protect remounting superblock read-only Miklos Szeredi
2011-11-21 11:11 ` [PATCH 3/4] vfs: count unlinked inodes Miklos Szeredi
2011-11-21 11:34 ` Christoph Hellwig [this message]
2011-11-21 11:51 ` Miklos Szeredi
2011-12-17 7:36 ` Al Viro
2011-12-19 14:38 ` Steven Whitehouse
2011-12-19 16:03 ` Miklos Szeredi
2011-12-19 16:14 ` Steven Whitehouse
2011-11-21 11:11 ` [PATCH 4/4] vfs: prevent remount read-only if pending removes Miklos Szeredi
2011-11-28 9:39 ` [PATCH 0/4] read-only remount race fix v10 Miklos Szeredi
2011-12-07 8:40 ` Miklos Szeredi
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=20111121113416.GA18087@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@suse.cz \
--cc=toshi.okajima@jp.fujitsu.com \
--cc=viro@ZenIV.linux.org.uk \
/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).