History log of /haiku-fatelf/src/add-ons/kernel/file_systems/packagefs/Directory.h
Revision Date Author Comments
# 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.


# 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


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

Pull derived UnpackingDirectory out of Directory

Move all package specifics from now abstract Directory to new derived
class UnpackingDirectory and adjust the Volume implementation
accordingly. This concludes the Node/Directory refactoring. Neither
class is aware of packages anymore.


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


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


# 1f70af09 13-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* round up the value put into st_blocks
* inject modification time of package folder into root folder of
package-fs


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


# 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


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


# 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


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

Pull derived UnpackingDirectory out of Directory

Move all package specifics from now abstract Directory to new derived
class UnpackingDirectory and adjust the Volume implementation
accordingly. This concludes the Node/Directory refactoring. Neither
class is aware of packages anymore.


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


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


# 1f70af09577410031686adc7c50321ef72f72195 13-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* round up the value put into st_blocks
* inject modification time of package folder into root folder of
package-fs


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


# 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