Messages in this thread | | | From | (Eric W. Biederman) | Date | Tue, 07 Oct 2008 17:04:15 -0700 | Subject | Re: sysfs: tagged directories not merged completely yet |
| |
Tejun Heo <tj@kernel.org> writes:
> Hello, a bit of additions after some sleep.
> Heh... it did sound like a plan but I don't think the plan would solve > the problem. filldir can't be put in rcu read critical section. :-p
There is srcu and there is the trick of grabbing the reference count on the current sysfs_dirent over the filldir and dropping the rcu lock (which works for proc).
To cut down on lock overhead from user space accesses that works.
>>> The revalidate on access model doesn't appear to have a way to track >>> remote renames. Something sysfs supports. >> >> Yeap, IIRC, one of the reasons why sysfs wasn't converted over to >> sysfs was because sysfs guarantees inode doesn't change over rename or >> move so that notifications keep working over renames. > > s/over to sysfs/over to revalidation/ and s/inode/dentry/. Maybe we can > just ignore dnotify? :-(
Well there are more cases than dnotify, there is the renaming of directories in sysfs, although rare that I think get awkward if we use revalidation.
I'm still not certain how we can get the lock ordering so it doesn't cause us problems. I will look at revalidation and what the other distributed filesystems are doing and see if that might work. If it doesn't we need refactor the VFS locking.
Eric
| |