Re: [RFC][PATCH] inotify 0.10.0

From: Ray Lee
Date: Thu Sep 30 2004 - 10:33:56 EST


On Wed, 2004-09-29 at 20:05 -0700, Paul Jackson wrote:
> Robert wrote:
> > A monitor on "/etc" will return "hosts" if hosts is modified. Which I
> > think is OK--we don't pass the entire path, nor do we want to if we
> > could do it easily, for numerous reasons ..
>
> How about returning the inode number?
>
> Notice that this can be converted to the name without using stat, using
> the d_ino field in the struct dirent returned from an opendir/readdir
> loop.

This changes an O(1) process to O(N), where N is the size of the
directory. That's one of the issues with dnotify that they're trying to
fix.

Bottom line, the kernel has that information available to it, and
cheaply. Forcing userspace to rederive that information for the
advantage of not spewing filenames out of the kernel is a false economy,
when viewed from the entire system.

Ray

-
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/