From: Al Viro <viro@ZenIV.linux.org.uk>
To: majianpeng <majianpeng@gmail.com>
Cc: john <john@johnmccutchan.com>, rlove <rlove@rlove.org>,
eparis <eparis@parisplace.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] Using inotify on /proc/partitoins
Date: Fri, 14 Jun 2013 03:05:23 +0100 [thread overview]
Message-ID: <20130614020523.GL4165@ZenIV.linux.org.uk> (raw)
In-Reply-To: <201306140926455537935@gmail.com>
On Fri, Jun 14, 2013 at 09:26:49AM +0800, majianpeng wrote:
> Hi all,
> I wanted to monitor /proc/partitions using inotify.
That, indeed, is a bug. Easily fixed - don't do that.
> But when i call 'cat /proc/partitions',the program can't return.
> So i added some message in kernel in order to find the reason.
> In procfs for some files, the inode used this method to alloc.
> proc_lookup-->proc_lookup_de--->proc_get_inode-->new_inode_pseudo
> In new_inode_pseudo, it will alloc new inode so every open-operation procfs will alloc new inode.
> So inotify can't work.
Of course, it can't work. Inotify if a kludge that kinda-sorta works
for local disk-backed filesystems, if you do not mind a pile of races.
For anything else it's completely worthless.
prev parent reply other threads:[~2013-06-14 2:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-14 1:26 [BUG] Using inotify on /proc/partitoins majianpeng
2013-06-14 2:05 ` Al Viro [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=20130614020523.GL4165@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=eparis@parisplace.org \
--cc=john@johnmccutchan.com \
--cc=linux-kernel@vger.kernel.org \
--cc=majianpeng@gmail.com \
--cc=rlove@rlove.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