From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Emelyanov Subject: Re: [rfc 3/7] procfs: Add ability to plugin auxiliary fdinfo providers Date: Wed, 04 Jul 2012 11:39:30 +0400 Message-ID: <4FF3F332.5030302@parallels.com> References: <20120627110116.201735815@openvz.org> <20120627110512.574379921@openvz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , Al Viro , Alexey Dobriyan , Andrew Morton , James Bottomley To: Cyrill Gorcunov Return-path: In-Reply-To: <20120627110512.574379921@openvz.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 06/27/2012 03:01 PM, Cyrill Gorcunov wrote: > This patch brings ability to plugin auxiliary fdinfo providers. > For example in further patches eventfd, evenpoll and fsnotify > will print out information associated with files. > > This feature is CONFIG_CHECKPOINT_RESTORE guarded to eliminate > overhead for those who don't need it at all (this > unfortunately makes patch bigger than I wanted). > > Signed-off-by: Cyrill Gorcunov > CC: Al Viro > CC: Alexey Dobriyan > CC: Andrew Morton > CC: Pavel Emelyanov > CC: James Bottomley > --- > fs/proc/fd.c | 208 ++++++++++++++++++++++++++++++++++++++++++++++++ > include/linux/proc_fs.h | 28 ++++++ > 2 files changed, 236 insertions(+) How about introducing one more file_operations member and call it in the seq_show() (if exists)? Only inotify, eventfd and eventpoll will implement one. This will allow to avoid all this complexity with drivers.