summaryrefslogtreecommitdiff
path: root/trans/hello.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-02-05 23:57:41 +0100
committerRichard Braun <rbraun@sceen.net>2014-02-05 23:57:41 +0100
commit4552df253251a92b0355bc6cc58513aa5feb8b30 (patch)
tree3ede2291c8241e86e6eff76e340c4722dc7bbc19 /trans/hello.c
parent4edd4887541eeff2970c27aa16328a42051e20f4 (diff)
trans/fakeroot: rework node caching
Instead of the FAKE_REFERENCE flag, rework node caching so that nodes are retained only if their attributes are actually changed. In addition, don't remove unreferenced nodes from the hash table at protid release, since their reference counter is unstable. Do it on node destruction, once the reference counter has reached 0. This means lookups can return nodes not referenced (other than by the hash table), a condition for which a check is added. By never acquiring a reference on such nodes, their counter is guaranteed to remain stable once unreferenced. * trans/fakeroot.c (FAKE_REFERENCE): Remove macro. (FAKE_DEFAULT): New macro. (set_default_attributes): New function. (set_faked_attribute): Likewise. (netfs_node_norefs): Remove node from hash table, properly taking care of all the locks involved. (fakeroot_netfs_release_protid): Remove node handling code, merely call netfs_release_protid. (netfs_S_dir_lookup): Handle unreferenced nodes, call set_default_attributes on node creation, remove call to netfs_attempt_chown. (netfs_attempt_chown): Call set_faked_attribute instead of accessing faked flags directly. (netfs_attempt_chauthor): Likewise. (netfs_attempt_chmod): Likewise. (main): Likewise.
Diffstat (limited to 'trans/hello.c')
0 files changed, 0 insertions, 0 deletions