public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: Robert Love <rlove@rlove.org>
Cc: Pavel Machek <pavel@suse.cz>,
	mtk.manpages@gmail.com, linux-api@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [take 3] Use pid in inotify events.
Date: Fri, 21 Nov 2008 17:53:29 +0300	[thread overview]
Message-ID: <20081121145329.GA14556@ioremap.net> (raw)
In-Reply-To: <acdcfe7e0811210630s65404ef5pf2b94731c2a872e1@mail.gmail.com>

On Fri, Nov 21, 2008 at 09:30:38AM -0500, Robert Love (rlove@rlove.org) wrote:
> Your solution needs to be (a) generally applicable and useful, with an
> (b) elegant and clean API, which (c) does not break ABI or API.
> 
> Overloading the cookie field is not the way to go. Finding ways to
> extend the API through inotify_init might be--you will have even
> higher hurdles of "do we really need this" though.

That's it. Does it mean neither solution will be accepted?
Just because 'we' do not need to know IO origin identity.

According to your three requirements for the solution. They can not be
satisfied, just because inotify event returned to userspace is fixed, so
there will be at least extension of the API and ABI.

> John & I intentionally did not add the pid field when writing inotify
> for reasons of security and questionable need. It also stinks to have
> to add a pid field to the event structure if that field is seldom
> used.

That's it: overloading existing cookie is a no-go, new interface is not
needed :)

What I would implement if things are getting that far, is a nesting
attributes in form of header and data, like

[generic inotify header: event, watch and attached data size]
[attribute0 size data]
[attribute1 size data]
...
[attributeN size data]

where attribute list, needed to be sent per event is created via ioctls
on top of inotify file descriptor, since overloading flag value of the
inotify_init1() allows to have only 32 attributes, while that may be not
enough. So far I see several: pid, IO offset and start, attributes
changed (access mode, permissions, xattrs names), combine move event
into two attributes of the same event instead of two events with the
same cookie. Maybe something else, this can be extended infinitely.

> Working on lkml often sounds like everyone is screaming NO, channeling
> nothing but stop energy. Sometimes people are, but more often what
> they really mean is you just have to take your time and do things
> right. Admittedly it is a lot of iteration, but Linux is a noble
> pursuit.

It is linux-kernel@ only. All subsystems I worked with behave
cooperately to solve the problem. All except generic changes, which end
up in linux-kernel@. But that's the matter of feeling that this is a
so special mail lists. We can live with it of course :)

-- 
	Evgeniy Polyakov

  reply	other threads:[~2008-11-21 14:53 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <acdcfe7e0811081035l56eedf05x8b3b7ee2fc01eee6@mail.gmail.com>
2008-11-08 18:40 ` [1/1] Use pid in inotify events Evgeniy Polyakov
2008-11-08 22:03   ` Evgeniy Polyakov
2008-11-10 15:13 ` [take 2] " Evgeniy Polyakov
2008-11-16 23:24 ` [take 3] " Evgeniy Polyakov
2008-11-17 16:59   ` Michael Kerrisk
2008-11-17 17:15     ` Evgeniy Polyakov
2008-11-17 17:23       ` Michael Kerrisk
2008-11-17 17:52         ` Evgeniy Polyakov
2008-11-20 13:09           ` Pavel Machek
2008-11-21 14:03             ` Evgeniy Polyakov
2008-11-21 14:20               ` Michael Kerrisk
2008-11-21 14:37                 ` Evgeniy Polyakov
2008-11-21 14:30               ` Robert Love
2008-11-21 14:53                 ` Evgeniy Polyakov [this message]
2008-11-21 14:57                 ` Pavel Machek
2008-11-21 15:08                   ` Evgeniy Polyakov
2008-11-18 13:19     ` Christoph Hellwig
2008-11-19 14:05       ` Evgeniy Polyakov
     [not found]         ` <cfd18e0f0811190634g276b4a2dm5b3d5de25a5c9222@mail.gmail.com>
2008-11-19 14:43           ` Michael Kerrisk
2008-11-20 19:17             ` Ville Syrjälä
2008-11-19 14:53           ` Evgeniy Polyakov
2008-11-20 22:34             ` John McCutchan
2008-11-20 23:06               ` Evgeniy Polyakov
2008-11-21 18:39                 ` Arnd Bergmann
2008-11-22  7:12                   ` David Newall
2008-11-22  9:41                     ` Evgeniy Polyakov
2008-11-22 11:41                       ` David Newall
2008-11-22  9:37                   ` Evgeniy Polyakov
2008-11-24  5:08                     ` John McCutchan
2008-11-24  7:30                       ` Evgeniy Polyakov

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=20081121145329.GA14556@ioremap.net \
    --to=zbr@ioremap.net \
    --cc=akpm@linux-foundation.org \
    --cc=hch@lst.de \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=pavel@suse.cz \
    --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