Re: [patch 2/9] procfs: Convert /proc/pid/fdinfo/ handling routinesto seq-file v2

From: Cyrill Gorcunov
Date: Sun Aug 26 2012 - 04:14:09 EST


On Sun, Aug 26, 2012 at 03:46:53AM +0100, Al Viro wrote:
> On Thu, Aug 23, 2012 at 02:43:25PM +0400, Cyrill Gorcunov wrote:
> > This patch converts /proc/pid/fdinfo/ handling routines to seq-file which
> > is needed to extend seq operations and plug in auxiliary fdinfo provides
> > from subsystems like eventfd/eventpoll/fsnotify.
> >
> > Note the proc_fd_link no longer call for proc_fd_info, simply because
> > proc_fd_info is converted to seq_fdinfo_open (which is seq-file open()
> > prototype).
>
> Actually, now that I've looked at it a bit more... You've just introduced
> an ABI change here. Look:

Crap, ineed. Thanks, Al! I'll fix it up, sorry.

...

> IMO doing that at open() time is just a headache for no good reason -
> resolving descriptor to struct file * at read() time as we do now
> is much saner. Better do that in your ->show(), since you are using
> a single-shot iterator anyway...

Oh, thanks for the hint, Al! I'll rework and send an updated version.

Cyrill
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/