History log of /haiku-fatelf/src/add-ons/kernel/file_systems/packagefs/UnpackingLeafNode.cpp
Revision Date Author Comments
# bbf2abc5 21-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Node: Keep track of VFS init status

* Node::VFSInit() and VFSUninit() set/clear the new node flag
NODE_FLAG_KNOWN_TO_VFS. They need to be called by overriding methods,
now.
* Add Node::IsKnownToVFS() which returns the VFS init status.


# 564f56b1 20-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Fix node handling on package addition/removal

* UnpackingLeafNode: Add a fFinalPackageNode attribute. It is set when
the node is about to be removed and will point to the node's previous
head package node and be used in its stead. From the perspective of
the FS hooks this leaves the node in an unchanged state.
* Unpacking[Leaf,Directory]Node:
- Add WillBeFirstPackageNode(), returning whether the given package
node would become the head package node when added.
- Add PrepareForRemoval() which removes all package nodes. In case of
UnpackingLeafNode it also sets fFinalPackageNode.
- Add CloneTransferPackageNodes(). It is only implemented for
UnpackingLeafNode. It clones the node, transfers all package nodes
to the clone and sets fFinalPackageNode on this node.
* Volume::_{Add,Remove}PackageNode(): Solved the following TODO: When a
package is added or removed and a file present in both the
added/removed package and another package with the version in the
former having precedence, we have to remove the node (leaving it
unchanged) and replace it by a new node. This prevents clients having
the node opened or mapped from suddenly seeing different data. It also
fixes unbalanced calls to PackageNode::VFSInit()/VFSUninit() which
would result in file descriptors to package files being leaked.


# f391c9b0 11-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add UnpackingNode::IsOnlyPackageNode()

It returns whether the given package node is the only package node
attached to that node.


# 03aed3a3 08-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Attribute index support for non-special attributes

* Add AttributeIndex class.
* Each attribute does now have an attribute index cookie. The new
attribute index service methods Node::IndexAttribute() and
IndexCookieForAttribute() create+set/retrieve the cookie. The cookie
is actually the attribute index's tree node.
* Add OldNodeAttribute::IndexCookieForAttribute() so the cookie is
available when the node changes.


# fcdac386 23-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add Node::Init() flags parameter

* Add Node::Init() flags:
- NODE_FLAG_KEEP_NAME: Take over ownership of the name.
- NODE_FLAG_CONST_NAME: Don't copy the name -- it's a constant that
lives at least as long as the object.
* Remove Init() implementations in derived classes that just call the
base class version.


# 097e795f 23-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Rename LeafNode to UnpackingLeafNode


# bbf2abc503c3c0c53cc3355d3cbcd38a50f37d9d 21-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Node: Keep track of VFS init status

* Node::VFSInit() and VFSUninit() set/clear the new node flag
NODE_FLAG_KNOWN_TO_VFS. They need to be called by overriding methods,
now.
* Add Node::IsKnownToVFS() which returns the VFS init status.


# 564f56b15075b0d15349ebfcc24f07b33ce109a0 20-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Fix node handling on package addition/removal

* UnpackingLeafNode: Add a fFinalPackageNode attribute. It is set when
the node is about to be removed and will point to the node's previous
head package node and be used in its stead. From the perspective of
the FS hooks this leaves the node in an unchanged state.
* Unpacking[Leaf,Directory]Node:
- Add WillBeFirstPackageNode(), returning whether the given package
node would become the head package node when added.
- Add PrepareForRemoval() which removes all package nodes. In case of
UnpackingLeafNode it also sets fFinalPackageNode.
- Add CloneTransferPackageNodes(). It is only implemented for
UnpackingLeafNode. It clones the node, transfers all package nodes
to the clone and sets fFinalPackageNode on this node.
* Volume::_{Add,Remove}PackageNode(): Solved the following TODO: When a
package is added or removed and a file present in both the
added/removed package and another package with the version in the
former having precedence, we have to remove the node (leaving it
unchanged) and replace it by a new node. This prevents clients having
the node opened or mapped from suddenly seeing different data. It also
fixes unbalanced calls to PackageNode::VFSInit()/VFSUninit() which
would result in file descriptors to package files being leaked.


# f391c9b0eacd77a8fa58a955050f7b9063e547d4 11-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add UnpackingNode::IsOnlyPackageNode()

It returns whether the given package node is the only package node
attached to that node.


# 03aed3a3146e5e989b327eba191e41a1d4bf3dfc 08-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Attribute index support for non-special attributes

* Add AttributeIndex class.
* Each attribute does now have an attribute index cookie. The new
attribute index service methods Node::IndexAttribute() and
IndexCookieForAttribute() create+set/retrieve the cookie. The cookie
is actually the attribute index's tree node.
* Add OldNodeAttribute::IndexCookieForAttribute() so the cookie is
available when the node changes.


# fcdac38641324da5f35f398d345c33c3fa12d920 23-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add Node::Init() flags parameter

* Add Node::Init() flags:
- NODE_FLAG_KEEP_NAME: Take over ownership of the name.
- NODE_FLAG_CONST_NAME: Don't copy the name -- it's a constant that
lives at least as long as the object.
* Remove Init() implementations in derived classes that just call the
base class version.


# 097e795f8e34d908418b06ae63d81d2f7916eb54 23-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Rename LeafNode to UnpackingLeafNode