public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Albert Cahalan <albert@users.sf.net>
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>,
	hch@infradead.org, rml@novell.com, ttb@tentacle.dhs.org,
	torvalds@osdl.org
Subject: Re: [patch] inotify for 2.6.11
Date: Tue, 8 Mar 2005 02:00:11 +0100	[thread overview]
Message-ID: <200503080200.14101.arnd@arndb.de> (raw)
In-Reply-To: <1110165231.1967.16.camel@cube>

On Maandag 07 März 2005 04:13, Albert Cahalan wrote:
> Christoph Hellwig writes:
> > See the review I sent.  Write is exactly the right interface for that kind
> > of thing.  For comment vs argument either put the number first so we don't
> > have the problem of finding a delinator that isn't a valid filename, or
> > use '\0' as such.
> 
> That's just putrid. You've proposed an interface that
> combines the worst of ASCII with the worst of binary.

I guess it's possible to avoid the need for passing the command at all.
The read data already has a format that mixes binary and variable-length
ascii data, so write could use a data structure similar (or even identical)
to the one used there, e.g.

struct inotify_watch_request {
 __u32  mask;  /* watch mask */
 __u32  len;  /* length (including nulls) of name */
 char  name[0]; /* stub for name */
};

This can replace both INOTIFY_WATCH and INOTIFY_IGNORE, if you simply
define a zero mask as a special value for ignore. FIONREAD is a
well-established interface, so I don't think it's necessary to replace
this.

> Adding plain old syscalls is rather nice actually.
> It's only a pain at first, while waiting for glibc
> to catch up.

Yes, that might be a workable interface as well, but don't mix syscalls
with a misc device then. Instead, you might build on something like
futexfs, with syscalls replacing both ioctl and read:

int inotify_open(int flags);
int inotify_watch(int fd, unsigned mask, char *name);
int inotify_ignore(int fd, int wd);
int inotify_getevents(int fd, int max_events, struct inotify_event *);

 Arnd <><

  reply	other threads:[~2005-03-08  1:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-07  3:13 [patch] inotify for 2.6.11 Albert Cahalan
2005-03-08  1:00 ` Arnd Bergmann [this message]
     [not found] <3Q7wT-4HJ-11@gated-at.bofh.it>
     [not found] ` <3Q7wT-4HJ-13@gated-at.bofh.it>
     [not found]   ` <3Q7wT-4HJ-15@gated-at.bofh.it>
     [not found]     ` <3Q7wT-4HJ-17@gated-at.bofh.it>
     [not found]       ` <3Q7wT-4HJ-19@gated-at.bofh.it>
     [not found]         ` <3Q7wT-4HJ-21@gated-at.bofh.it>
     [not found]           ` <3Q7wT-4HJ-9@gated-at.bofh.it>
     [not found]             ` <pan.2005.04.08.01.37.42.462474@intel.com>
2005-04-08  1:52               ` Robert Love
     [not found] <3EqlI-2DI-59@gated-at.bofh.it>
     [not found] ` <3PRs6-89U-15@gated-at.bofh.it>
     [not found]   ` <3PYWC-636-7@gated-at.bofh.it>
     [not found]     ` <3Q0F6-7Ar-37@gated-at.bofh.it>
     [not found]       ` <3Q4z0-2tA-15@gated-at.bofh.it>
     [not found]         ` <pan.2005.04.06.00.53.44.705260@intel.com>
2005-04-06  1:21           ` Robert Love
  -- strict thread matches above, loose matches on Subject: below --
2005-03-04 18:37 Robert Love
2005-03-04 21:38 ` Timothy R. Chavez
2005-03-04 21:40   ` Robert Love
2005-03-06  0:04 ` Christoph Hellwig
2005-03-06  0:40   ` Robert Love
2005-03-07  1:23     ` Christoph Hellwig
2005-03-07  4:33       ` Robert Love
2005-04-05  7:58 ` Prakash Punnoor
2005-04-05 16:12   ` Robert Love
2005-04-05 17:20     ` Prakash Punnoor
2005-04-05 17:35       ` Robert Love
2005-04-05 22:09       ` Robert Love
2005-04-06  3:21       ` Adam Kropelin
2005-04-10 16:16 ` Erik Meitner

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=200503080200.14101.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=albert@users.sf.net \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rml@novell.com \
    --cc=torvalds@osdl.org \
    --cc=ttb@tentacle.dhs.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