devfs
[Top] [All Lists]

Re: small patch + question

To: Johannes Erdfelt <jerdfelt@xxxxxxxxxxx>
Subject: Re: small patch + question
From: Richard Gooch <rgooch@xxxxxxxxxxxxxxx>
Date: Wed, 7 Jun 2000 23:42:37 -0600
Cc: devfs@xxxxxxxxxxx
In-reply-to: <20000517161218.C15221@xxxxxxxxxxx>
References: <20000517161218.C15221@xxxxxxxxxxx>
Sender: owner-devfs@xxxxxxxxxxx
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.

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.

                                Regards,

                                        Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current:   rgooch@xxxxxxxxxxxxxxx

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