History log of /haiku-fatelf/src/add-ons/kernel/file_systems/packagefs/Node.h
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.


# 8fb06810 15-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Implement more virtuals in Node and Directory

* Node: Add default implementations for UserID(), GroupID(),
OpenAttributeDirectory(), and OpenAttribute().
* Directory: Add default implementations for Mode() and FileSize().
* Remove the respective hook implementations in the PackageLink*
classes.


# 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.


# 73d93cd7 24-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Fix NODE_FLAG_OWNS_NAME value


# 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.


# f2235ed5 24-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Empty Node::VFS{Init(),Uninit}() implementations


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

Node: Add setters for ID and parent


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

Remove package related dependencies from Node

* Move package related methods from Node to new interface UnpackingNode.
* LeafNode and Directory derive from UnpackingNode now.
* Adjust Volume implementation accordingly.


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

Attribute dir access kernel interface abstraction

* Introduce interface AttributeDirectoryCookie and currently only
implementation UnpackingAttributeDirectoryCookie. This is an interface
for reading/rewinding an attribute directory.
* Add abstract virtual Node::OpenAttributeDirectory() method that
returns an AttributeDirectoryCookie and implement it for derived
classes.
* In the kernel interface attribute directory hooks use
AttributeDirectoryCookie now.


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

Remove unused Node fields


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

Kernel interface abstraction for attribute access

* Introduce interface AttributeCookie and currently only implementation
UnpackingAttributeCookie. This is an interface for reading/stat()ing
an attribute.
* Add abstract virtual Node::OpenAttribute() method that returns an
AttributeCookie and implemented it for derived classes.
* In the kernel interface attribute hooks use AttributeCookie now. The
attribute directory hooks are unchanged.


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

Remove kernel_interface.cpp LeafNode dependency

Introduce abstract virtual Node::ReadSymlink() method that is now used
in packagefs_read_symlink() instead of casting to LeafNode.


# d73033ce 21-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made PackageDomain BReferenceable.
* LeafNode/Directory: We make sure that the added PackageNode with the newest
modified time is always at the head of the list. This is the package node
whose stat, attribute data and, in case of non-directory nodes, also content
data will be returned. This results in a well-defined algorithm what happens
when multiple directories contain the same file -- the newest file wins.
* Resolved most TODOs regarding error handling when adding a package domain,
package, or package node.
* Volume::_AddPackageContentRootNode(): Fixed the back tracking loop. It would
just continue with siblings of the given root node, causing them to be added
more than once, leading to data structure corruption.
* We now listen to the packages directory. When packages are added or removed
their contents is automatically added/removed to the file system. We don't
listen to the package files themselves yet. I.e. modifying an "installed"
package in place respectively copying/downloading it there will probably not
work correctly.
Due to a limitation in the userlandfs the mechanism works correctly only when
using the kernel module. When running the userland version, one better leaves
the packages directory alone while packagefs is mounted.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34172 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef58ee84 19-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added method PackageDataReader::ReadDataToOutput(), which writes the read
data to a DataOutput.
* Implemented packagefs' io() hook and changed the read() hook implementation
to use the file cache. It's now possible to mmap() files and thus execute
programs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34138 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 46776004 18-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Extract the attributes from the package files and attach them as
PackageNodeAttribute to the PackageNodes.
* Implemented the attribute FS interface hooks.
* Made Package and PackageNode BReferenceable.
* Fixed the reference management for Node.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34119 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 744a460c 17-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Package: Added Open() (and matching Close()) method, which opens the package
file once, tracking an open count.
* Added VFSInit()/VFSUninit() methods to the Node and PackageNode class
hierarchies, called by the {get,put}_vnode() PackageFile implements them to
set up/tear down access to the file data. Also added a Read() reading the
data.
* Implemented the open(), free_cookie(), and read() FS hooks for real. Reading
files works now. Executing doesn't yet -- it requires working with
IORequests in a way not supported by the userlandfs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34102 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ccaaa96 17-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Filter out write permissions.
* We now report more correct stat data. The information are retrieved from the
Package* objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34098 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 694cb0b2 17-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented intermediate base class PackageLeafNode for PackageFile and
PackageSymlink with a "fat" interface.
* Replaced File and Symlink by fat class LeafNode.
* Added Package* object management to Directory and LeafNode.
* Implemented packagefs_read_symlink(), so symlinks work now.
* Added some missing locking the kernel interface.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34096 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cc32c484 17-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Work in progress:
* The FS parses package files from "/boot/common/packages" and builds an
node tree representation of the contained entries. Merging directories should
work. Lots of other stuff is missing yet, though.
* Implemented the hooks for directory entry lookup and iteration. So it's
possible to see the contents of the FS at least.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34088 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b932032a 15-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented the most basic functionality required to cleanly mount and unmount
(at least in userlandfs).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34069 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 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.


# 8fb06810185b76fc2ef0f2ea253950dcc00e88fb 15-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Implement more virtuals in Node and Directory

* Node: Add default implementations for UserID(), GroupID(),
OpenAttributeDirectory(), and OpenAttribute().
* Directory: Add default implementations for Mode() and FileSize().
* Remove the respective hook implementations in the PackageLink*
classes.


# 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.


# 73d93cd717d73b604ddf87ca30e656f7d4a7f6d8 24-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Fix NODE_FLAG_OWNS_NAME value


# 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.


# f2235ed5bf68fb74bc562021bb5f3649eb8cafe7 24-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Empty Node::VFS{Init(),Uninit}() implementations


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

Node: Add setters for ID and parent


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

Remove package related dependencies from Node

* Move package related methods from Node to new interface UnpackingNode.
* LeafNode and Directory derive from UnpackingNode now.
* Adjust Volume implementation accordingly.


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

Attribute dir access kernel interface abstraction

* Introduce interface AttributeDirectoryCookie and currently only
implementation UnpackingAttributeDirectoryCookie. This is an interface
for reading/rewinding an attribute directory.
* Add abstract virtual Node::OpenAttributeDirectory() method that
returns an AttributeDirectoryCookie and implement it for derived
classes.
* In the kernel interface attribute directory hooks use
AttributeDirectoryCookie now.


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

Remove unused Node fields


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

Kernel interface abstraction for attribute access

* Introduce interface AttributeCookie and currently only implementation
UnpackingAttributeCookie. This is an interface for reading/stat()ing
an attribute.
* Add abstract virtual Node::OpenAttribute() method that returns an
AttributeCookie and implemented it for derived classes.
* In the kernel interface attribute hooks use AttributeCookie now. The
attribute directory hooks are unchanged.


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

Remove kernel_interface.cpp LeafNode dependency

Introduce abstract virtual Node::ReadSymlink() method that is now used
in packagefs_read_symlink() instead of casting to LeafNode.


# d73033ce64d4d9b5c6e9831951fecc2398a95ca2 21-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made PackageDomain BReferenceable.
* LeafNode/Directory: We make sure that the added PackageNode with the newest
modified time is always at the head of the list. This is the package node
whose stat, attribute data and, in case of non-directory nodes, also content
data will be returned. This results in a well-defined algorithm what happens
when multiple directories contain the same file -- the newest file wins.
* Resolved most TODOs regarding error handling when adding a package domain,
package, or package node.
* Volume::_AddPackageContentRootNode(): Fixed the back tracking loop. It would
just continue with siblings of the given root node, causing them to be added
more than once, leading to data structure corruption.
* We now listen to the packages directory. When packages are added or removed
their contents is automatically added/removed to the file system. We don't
listen to the package files themselves yet. I.e. modifying an "installed"
package in place respectively copying/downloading it there will probably not
work correctly.
Due to a limitation in the userlandfs the mechanism works correctly only when
using the kernel module. When running the userland version, one better leaves
the packages directory alone while packagefs is mounted.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34172 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef58ee846b9962044875d3c8bdd0ff7d4843b29f 19-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added method PackageDataReader::ReadDataToOutput(), which writes the read
data to a DataOutput.
* Implemented packagefs' io() hook and changed the read() hook implementation
to use the file cache. It's now possible to mmap() files and thus execute
programs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34138 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 46776004f7f9bdf5af8c91372f050ee9f4e64076 18-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Extract the attributes from the package files and attach them as
PackageNodeAttribute to the PackageNodes.
* Implemented the attribute FS interface hooks.
* Made Package and PackageNode BReferenceable.
* Fixed the reference management for Node.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34119 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 744a460c12f6471054cbb2e8472ea64d02e7b43e 17-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Package: Added Open() (and matching Close()) method, which opens the package
file once, tracking an open count.
* Added VFSInit()/VFSUninit() methods to the Node and PackageNode class
hierarchies, called by the {get,put}_vnode() PackageFile implements them to
set up/tear down access to the file data. Also added a Read() reading the
data.
* Implemented the open(), free_cookie(), and read() FS hooks for real. Reading
files works now. Executing doesn't yet -- it requires working with
IORequests in a way not supported by the userlandfs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34102 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ccaaa9642a7697d46bf6a8198e094b82982ab58 17-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Filter out write permissions.
* We now report more correct stat data. The information are retrieved from the
Package* objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34098 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 694cb0b270e4acba08d83b0a520217081011ba28 17-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented intermediate base class PackageLeafNode for PackageFile and
PackageSymlink with a "fat" interface.
* Replaced File and Symlink by fat class LeafNode.
* Added Package* object management to Directory and LeafNode.
* Implemented packagefs_read_symlink(), so symlinks work now.
* Added some missing locking the kernel interface.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34096 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cc32c48494415e116417542ddc25bf0d28e616c5 17-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Work in progress:
* The FS parses package files from "/boot/common/packages" and builds an
node tree representation of the contained entries. Merging directories should
work. Lots of other stuff is missing yet, though.
* Implemented the hooks for directory entry lookup and iteration. So it's
possible to see the contents of the FS at least.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34088 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b932032a35bf6775e1b37bc3b39a2c9afa8c3ac1 15-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented the most basic functionality required to cleanly mount and unmount
(at least in userlandfs).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34069 a95241bf-73f2-0310-859d-f6bbb57e9c96