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

Declare packagefs persistent

Besides that it is kind of correct, it also makes tracker queries work
correctly.


# 0b45c28c 08-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Implement packagefs index (dir) hooks


# 3b97d999 08-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add set_dirent_name() without name length parameter


# 1fb71f87 05-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Implement query FS hooks, add empty index FS hooks


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

Update copyright year


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


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

Move set_dirent_name() to Utils.h


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


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

WIP towards packagefs package links support

* Introduce Version class representing a version.
* Introduce Dependency and Resolvable class and add lists of either to
Package.
* Parse package attributes and add dependencies and resolvables to
Package.
* Add a mount type to Volume and add a respective mount parameter
"mount-type" (values "system", "common", "home", "custom"). Also
implies the shine-through type, if that's not given.
* Introduce class PackageFamily which groups equally named and versioned
packages.
* Add class PackageFSRoot. Each instance represents a possible file
system root (separate roots for different chroot environments). Tracks
Volumes belonging to the same root and their packages.


# bd85d7c7 21-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Implement packagefs_get_vnode_name() hook


# 6e2af637 21-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add support for shine-through directories

* packagefs_mount(): Initialize the fs_volume earlier, so it is more
usuable in Volume::Mount().
* The new mount parameter "shine-through" can be used to specify which
shine-through mode shall be used. Can be "system", "common", "home",
and "none". Depending on the setting it is decided which directories
of the underlying file system are bind-mounted on top of ours.
* Fix infinite loop in Volume::_RemovePackageContent().
* Use the RETURN_ERROR() macro in more places to help with debugging.


# 5fb1c6ff 30-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

Refactored hpkg implementation to provide some separation between
public and private API (still far from ideal, but a start):
* moved several HPKG-classes into the public namespace BPackageKit::HPKG
* added fImpl-wrappers around PackageReader and PackageWriter to hide
most of the gory details
* adjusted 'package'-binary and packagefs accordingly


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


# 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


# 80ddd8da 12-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* Volume::Mount(): fix KDL in case the volume-name was missing from
the mount parameters
* packagefs_read_stat(): put some sane value into st_blocks

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


# 4ca2f690 12-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* added support to packagefs for picking up its volume name from the
mount parameters - there doesn't seem to be a way for a filesystem
to access the path to which it was mounted, is there?


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


# 6f8d1ab0 12-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* implement fetching of initial domain from the mount parameters in
order to be able to mount packages from somewhere else than
'/boot/common/packages' (squashes a TODO)
* squashed another TODO about needing to remove nodes of already
installed packages if anything goes wrong during the activation
of a package domain
* fix what to me looks like a bug in Volume::AddPackageDomainJob::Do(),
fDomain is accessed unconditionally in the destructor, so NULLing
it here is bad (it doesn't make sense from a reference-passing POV
either). The problem never showed as this code is never being executed
currently (no way to add additional package domains as of yet)


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


# d63f4274 18-Oct-2010 Jérôme Duval <korli@users.berlios.de>

added a file system call preallocate() as described in #6285, currently unused


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39006 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


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

* Added new interface BufferCache -- basically a memory allocator with the
option to cache a freed buffer -- and implementations
BlockBufferCache{NoLock,Kernel}.
* ZlibPackageDataReader does now dynamically get its read and uncompress
buffers from a provided BufferCache when needed.
* Allocating the buffers once and keeping them over the whole life time was a
bit too memory heavy, since we create a reader for every file for which a
vnode is created. A FS module global factory provides a buffer cache.
* Added a mutex to PackageFile::DataAccessor which guards the access to the
data reader which isn't thread safe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34115 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


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

The very beginning of a package FS: Empty stubs for a minimal read-only file
system.


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


# 9076c04c01b474b3246f7281e004e8348d81f548 08-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Declare packagefs persistent

Besides that it is kind of correct, it also makes tracker queries work
correctly.


# 0b45c28c4f69bfb91ecb58dd81bacf5a472d5d5b 08-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Implement packagefs index (dir) hooks


# 3b97d999e7ff3f9556096d0a73a0defb428f8d00 08-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add set_dirent_name() without name length parameter


# 1fb71f87396e916f929533f393624d434d9a3cc9 05-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Implement query FS hooks, add empty index FS hooks


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

Update copyright year


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


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

Move set_dirent_name() to Utils.h


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


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

WIP towards packagefs package links support

* Introduce Version class representing a version.
* Introduce Dependency and Resolvable class and add lists of either to
Package.
* Parse package attributes and add dependencies and resolvables to
Package.
* Add a mount type to Volume and add a respective mount parameter
"mount-type" (values "system", "common", "home", "custom"). Also
implies the shine-through type, if that's not given.
* Introduce class PackageFamily which groups equally named and versioned
packages.
* Add class PackageFSRoot. Each instance represents a possible file
system root (separate roots for different chroot environments). Tracks
Volumes belonging to the same root and their packages.


# bd85d7c7b9536f0fdea71374bb25aa7876dab131 21-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Implement packagefs_get_vnode_name() hook


# 6e2af637b947771aa355359a615e6c889a783c6f 21-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add support for shine-through directories

* packagefs_mount(): Initialize the fs_volume earlier, so it is more
usuable in Volume::Mount().
* The new mount parameter "shine-through" can be used to specify which
shine-through mode shall be used. Can be "system", "common", "home",
and "none". Depending on the setting it is decided which directories
of the underlying file system are bind-mounted on top of ours.
* Fix infinite loop in Volume::_RemovePackageContent().
* Use the RETURN_ERROR() macro in more places to help with debugging.


# 5fb1c6ff1f55fe4094a761b653041b3a0b9abf1d 30-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

Refactored hpkg implementation to provide some separation between
public and private API (still far from ideal, but a start):
* moved several HPKG-classes into the public namespace BPackageKit::HPKG
* added fImpl-wrappers around PackageReader and PackageWriter to hide
most of the gory details
* adjusted 'package'-binary and packagefs accordingly


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


# 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


# 80ddd8dafcf2cde74a15bab4e6cf90a8708146f3 12-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* Volume::Mount(): fix KDL in case the volume-name was missing from
the mount parameters
* packagefs_read_stat(): put some sane value into st_blocks

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


# 4ca2f6909f31e3a740e29e41a79d045723124909 12-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* added support to packagefs for picking up its volume name from the
mount parameters - there doesn't seem to be a way for a filesystem
to access the path to which it was mounted, is there?


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


# 6f8d1ab0891a6914b775269ded62006bed03c8e1 12-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* implement fetching of initial domain from the mount parameters in
order to be able to mount packages from somewhere else than
'/boot/common/packages' (squashes a TODO)
* squashed another TODO about needing to remove nodes of already
installed packages if anything goes wrong during the activation
of a package domain
* fix what to me looks like a bug in Volume::AddPackageDomainJob::Do(),
fDomain is accessed unconditionally in the destructor, so NULLing
it here is bad (it doesn't make sense from a reference-passing POV
either). The problem never showed as this code is never being executed
currently (no way to add additional package domains as of yet)


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


# d63f4274b665d32065f24a7a01a025578c8a43c9 18-Oct-2010 Jérôme Duval <korli@users.berlios.de>

added a file system call preallocate() as described in #6285, currently unused


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39006 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


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

* Added new interface BufferCache -- basically a memory allocator with the
option to cache a freed buffer -- and implementations
BlockBufferCache{NoLock,Kernel}.
* ZlibPackageDataReader does now dynamically get its read and uncompress
buffers from a provided BufferCache when needed.
* Allocating the buffers once and keeping them over the whole life time was a
bit too memory heavy, since we create a reader for every file for which a
vnode is created. A FS module global factory provides a buffer cache.
* Added a mutex to PackageFile::DataAccessor which guards the access to the
data reader which isn't thread safe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34115 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


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

The very beginning of a package FS: Empty stubs for a minimal read-only file
system.


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