devfs
[Top] [All Lists]

Re: small patch + question

To: Richard Gooch <rgooch@xxxxxxxxxxxxxxx>
Subject: Re: small patch + question
From: Johannes Erdfelt <jerdfelt@xxxxxxxxxxx>
Date: Wed, 7 Jun 2000 22:46:52 -0700
Cc: devfs@xxxxxxxxxxx
In-reply-to: <200006080542.e585gbn18615@vindaloo.ras.ucalgary.ca>; from rgooch@ras.ucalgary.ca on Wed, Jun 07, 2000 at 11:42:37PM -0600
References: <20000517161218.C15221@valinux.com> <200006080542.e585gbn18615@vindaloo.ras.ucalgary.ca>
Sender: owner-devfs@xxxxxxxxxxx
On Wed, Jun 07, 2000, Richard Gooch <rgooch@xxxxxxxxxxxxxxx> wrote:
> Johannes Erdfelt writes:
> > On an unrelated point, I have a question about changing permissions and
> > supression.
> > 
> > I have a module which dynamically tracks permissions for USB devices
> > and applies them back to the device when it gets plugged back in.
> > 
> > In the REGISTER handler, I do a chown/chmod pair (well, fchown/fchmod)
> > which then generates another CHANGE request, causing extra processing since
> > it looks like a user (admin, etc) made a change to file, when it was
> > actually generated by devfsd.
> > 
> > Would it be possible for devfs (the kernel portion) to not generate
> > events when the devfsd process (or the process which has .devfsd
> > open) makes changes?
> 
> This is possible, but it has a performance impact, since inode changes
> will then require a test to see if the changing process is devfsd or
> one of its children. This involves walking up the process tables.

I was thinking of just the devfsd process. Not necessarily any children.

> And even if it were free, there's still a problem:
> 
> > I can't see a reason where it would be needed since devfsd is always
> > aware of the changes it makes, since it made them in the first
> > place.
> 
> That's only really true for devfsd itself. It doesn't know what
> dynamically loaded extensions or scripts will do.

Dynamically loaded extensions could be handled and scripts would
be children and not match the check.

Probably too complicated for what it's worth anyway.

JE


<Prev in Thread] Current Thread [Next in Thread>