From: Steven Whitehouse <swhiteho@redhat.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
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, 19 Dec 2011 14:38:42 +0000 [thread overview]
Message-ID: <1324305522.2723.51.camel@menhir> (raw)
In-Reply-To: <20111217073604.GA31872@ZenIV.linux.org.uk>
Hi,
On Sat, 2011-12-17 at 07:36 +0000, Al Viro wrote:
> On Mon, Nov 21, 2011 at 12:11:32PM +0100, Miklos Szeredi wrote:
> > @@ -241,6 +242,11 @@ void __destroy_inode(struct inode *inode)
> > BUG_ON(inode_has_buffers(inode));
> > security_inode_free(inode);
> > fsnotify_inode_delete(inode);
> > + if (!inode->i_nlink) {
> > + WARN_ON(atomic_long_read(&inode->i_sb->s_remove_count) == 0);
> > + atomic_long_dec(&inode->i_sb->s_remove_count);
> > + }
>
> Umm... That relies on ->destroy_inode() doing nothing stupid; granted,
> all work on actual file removal should've been done in ->evice_inode()
> leaving only (RCU'd) freeing of in-core, but there are odd ones that
> do strange things in ->destroy_inode() and I'm not sure that it's not
> a Yet Another Remount Race(tm). OTOH, it's clearly not worse than what
> we used to have; just something to keep in mind for future work.
>
GFS2 is one of those cases. The issue is that when we enter
->evict_inode() with i_nlink 0, we do not know whether any other node
still has the inode open. If it does, then we do not deallocate it in
->evict_inode() but instead just forget about it, just as if i_nlink was
> 0 leaving the remaining opener(s) to do the deallocation later,
Steve.
next prev parent reply other threads:[~2011-12-19 14:38 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
2011-11-21 11:51 ` Miklos Szeredi
2011-12-17 7:36 ` Al Viro
2011-12-19 14:38 ` Steven Whitehouse [this message]
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=1324305522.2723.51.camel@menhir \
--to=swhiteho@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.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).