Sat Jul 7 18:37:43 PDT 2018
of O(d), where d is the depth of the shadow tree. But is it worth for
any effort and extending the namecache struct further? I doubt if ever
anyone would want to create an overlay of about hundred levels... even
ten would be pretty eccentric.
not at all. i'm thinking of packaging systems which use layered
filesystems to show packages (or not), stuff like this...
now, if we want to e.g. rename the whole group, we just start at
ncp_shadowroot and cycle through ncp_shadowlinks.
Renaming seems to be a truly individual act -- at least, I can't think
of any useable semantics for an operation like "group rename".
i expressed myself wrongly. i ment "rename which requires us to rename
all associated namecache shadow entries in the group".
AFAICS the critical one is breaking down the parent/child relation. My
idea is that a p/c cut should imply breaking down shadower/shadowed
relatons. If we do that, the upper layer will see the lack of the link
into the lower one, and will recreate that as it's appropriate in the
new situation. The upper layer wouldn't be aware of the rename event in
the lower one as such.
I don't understand this parent/child thing. could you please elaborate
on this? We don't have disconnected namecache entries, but maybe it's
something else you are talking about.
the only thing that (still) bothers me is: what happens if somebody
locks (cache_lookup) an unresolved (and thus unconnected) nullncp and
locks the shadowed ncp (where the system doesn't know about yet about
this connection). imagine two processes doing this, each in
time thread1 thread2
1 lock null lock lower
2 resolve null (blocks) lock null (blocks)
we have a deadlock. resolving null means having to lock lower, but
this fails as another thread already obtained the lock.
Locking is a group operation. Therefore it must be group atomic -- eg.,
locking the group can't mean obtaining a lock (in the old sense) on
Yes, unless the null layer isn't yet associated with the lower layer.
There must be one distinguished parameter in the group which carries
locked/unlocked state. In my approach it's the nc_exlocks field of the
group head. If a thread has that bumped, it has obtained the lock on
yes, all roger.
Regarding your example, thread2 won't perform a separate "lock null"
unless it just wants to lock two entries of which it doesn't know the
shadow assocition. maybe for renaming or whatnot.
Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\
Work - Mac +++ space for low â¬â¬â¬ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
Content-Type: application/octet-stream; name="pgp00003.pgp"
Content-Disposition: attachment; filename="pgp00003.pgp"
Content-Description: "Description: This is a digitally signed message part"
More information about the Kernel