No subject


Tue May 4 09:08:51 PDT 2021


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 
different order:

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 
each
entry simultaneously.
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 
the
whole group.
yes, all roger.

Regarding your example, thread2 won't perform a separate "lock null"
step.
unless it just wants to lock two entries of which it doesn't know the 
shadow assocition.  maybe for renaming or whatnot.

cheers
  simon
--
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   / \

Attachment:
PGP.sig

--Boundary..85347.1348360655.multipart/signed
Content-Type: application/octet-stream; name="pgp00003.pgp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="pgp00003.pgp"
Content-Description: "Description: This is a digitally signed message part"

LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcg
djEuNC4xIChEYXJ3aW4pCgppRDhEQlFGRDFwUFVyNVMrZGs2ejg1b1JBdmg2
QUowUUxjeERnVDhsWGdKMXdyQ0xTdHU0NW5zQ1JRQ2dneTdHClc5Q3pMOGhB
QjdEUitKQ3hnVnhScG4wPQo9Q2s3VwotLS0tLUVORCBQR1AgU0lHTkFUVVJF
LS0tLS0K
--Boundary..85347.1348360655.multipart/signed--





More information about the Kernel mailing list