Re: [PATCH 1/5] fsnotify/vfsmount: add fsnotify fields to struct vfsmount



On Thu, Dec 10, 2009 at 10:01 PM, Andreas Gruenbacher <agruen@xxxxxxx> wrote:
On Friday 04 December 2009 16:39:25 Christoph Hellwig wrote:
What's the rationale for adding them?

The idea is to provide a mechanism to watch for "all events", but in a
namespace aware way: for that, a process registers interest in all mount
points it can reach.  With the previous hack, a global "I want it all" flag,
per-namespace listeners were not possible.

Root can use bind mounts onto themselves (e.g., mount --bind /foo/bar
/foo/bar) to watch arbitrary directories with the per-mount-point mechanism.
Mount as user will open up additional use cases.

It would be nice to be able to register interest in all events below a
directory which is not a mount point, too.  The problem with that is that the
number of cached inodes below a given directory could be huge -- and we would
have to visit them all atomically in order to "mark" them, which is not
feasible.  The per-mount-point mechanism will eventually give us *almost* the
same, and so I believe it's good enough.


As another dimension of the same problem, it would be nice to
register interest in events generated by only a particular set of processes.
As a special case of this, can I register only for events generated
by myself and all my child processes. Is it already covered in some way?

There are situations where this could be very useful. One such case could be
somebody wanting to audit any random application. Collecting data for the whole
system and then filtering might be possible, but maynot be very efficient.
It might be good to add this while we are at it.

Let me know if I am missing something.

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



Relevant Pages

  • Re: Mounting on a directory
    ... IoReportDetectedDevice with all NULLs as hardware resource arguments. ... Register MOUNTDEV_MOUNTED_DEVICE_GUID on this PDO. ... on a directory (a nested mount). ... Create a device object based on a request ...
    (microsoft.public.development.device.drivers)
  • Re: Ping the Nuviisti.
    ... Nuvi 1490T. ... mount are>>> on their way, ... Register with Garmin to get a free month of camera updates and ...
    (uk.rec.motorcycles)
  • Re: Cloning 1 hard disk in a software RAID
    ... does not register at all any more & the md subsystem won't mount it as ... being "stale". ...
    (Ubuntu)
  • Registering with a portmapper
    ... Suppose I want to register my program say A with the portmapper. ... That is when someone makes a "mount" call through the terminal, ... port mapper will be queried and then I want the port mapper to give ...
    (comp.unix.programmer)
  • Re: HTTP could not register URL inconsistency
    ... was why my wizard created server didn't need to register the URL. ... HTTP could not register URL ... Configuring Namespace Reservations ... Namespace reservation assigns the rights for a portion of the HTTP URL ...
    (microsoft.public.dotnet.framework.webservices)