History log of /haiku/src/add-ons/kernel/file_systems/userlandfs/server/UserlandRequestHandler.cpp
Revision Date Author Comments
# 422eeed6 15-Oct-2020 Murai Takashi <tmurai01@gmail.com>

file_systems/userlandfs: Fix -WFormat=

Change-Id: Ib36c0696be0604e452ba68158fe98ecf31b4216f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3337
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# ffba6606 29-Mar-2015 Michael Lotz <mmlr@mlotz.ch>

UserlandFS: Make 64 bit clean and enable build for x86_64.

I did not bother to fix the BeOS kernel emulation, so this part is
still left out of the x86_64 build.


# 0a1dabca 22-Jul-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added public io_request_is_vip(), returning whether the given request has the
VIP flag set.


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


# c77f643a 20-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for in-kernel node monitoring ({add,remove}_node_listener()).


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


# 996aa11b 12-Aug-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Spotted by "Blub": After unmounting we didn't delete the Volume object.


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


# e66cd9d7 02-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* For every request to userland we also send the team/thread/user/group ID of
the current thread, now. Implemented by introducing a new base class
KernelRequest which has respective attributes.
* Server: RequestThreadContext does now also save the request that is being
processed. Furthermore some space has been reserved for file system specific
data, which can be initialized by the new
FileSystem::InitRequestThreadContext().
* FUSE library: Implemented fuse_get_context() using the new
RequestThreadContext feature.


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


# 3cf43c26 25-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed the fs_vnode_ops::create_dir() parameter for returning the ID of the
newly created dir. The VFS really doesn't need it and for some file systems
it might not be easy to get by. Several file systems (e.g. rootfs and fat)
were ignoring the parameter anyway.


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


# 4649fe05 17-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Haiku kernel interface emulation: Retrieve the capabilities for each vnode.
We do some caching using a hash table indexed by the operations vector.
* Pass the vnode capabilities to the kernel module.
* In the kernel tailor the operation vectors for volumes and vnodes passed to
the VFS according to the respective capabilities. This way those vectors look
pretty much like those from the client FS. This saves unnecessary calls when
hooks are not implemented and should also fix compatibility problems in cases
where not implementing a hook and returning an error don't mean the same to
the VFS.
* Inlined some of the kernel module Volume class getters.


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


# c76e8d36 15-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented forwarding the do_iterative_fd_io() callbacks to userland.
* Pass the request offset and length with the DoIORequest. This allows us to
already get the first vecs for do_iterative_fd_io() in userland, saving a
trip back and forth.


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


# 7c1ffcb9 13-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* The nature of asynchronous I/O is to be asynchronous. So we can't store
an on-stack structure for the request in a hash table when forwarding the
io() hook. Create a new object (HaikuKernelIORequest) instead and store it
in a hash table in HaikuKernelFileSystem.
* Some work on the userland side of do_iterative_fd_io().
* Added some missing requests in UserlandFSUtil::is_{kernel,userland}_request().


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


# f1c6ce08 10-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented the userland side for propagating the io() and cancel_io() hooks.
* Implemented io_request_is_write().


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


# 5b2561a5 01-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

A NULL pointer was dereferenced when mounting failed.


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


# b19b5f9d 27-Feb-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

More adjustments to the new FS interface. The enabled sources compile again,
but don't link yet.


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


# cdebdeb0 25-Feb-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Some more work towards adjusting the UserlandFS to the current FS interface:
* Split the FSCapabilities bit mask into three bit masks for the FS, the
volume, and the vnodes, since we have three independent FS interface
structures, now. The latter is not supported in the kernel add-on, yet.
* Server:
- Temporarily removed some things from the build (the BeOS interface
and the cache implementations).
- Some WIP in HaikuKernelVolume and [haiku_]kernel_emu.{h,cpp}.
- Added HaikuKernelNode, which wraps fs_vnode for the client FS.
The server is still quite a bit away from being buildable again.


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


# 636bfc08 02-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Renamed fs/vfs_select.cpp to wait_for_objects.cpp and got rid of
vfs_select.h, respectively moved most of it into the new kernel
private header wait_for_objects.h.
* Added new experimental API functions wait_for_objects[_etc](). They
work pretty much like poll(), but also for semaphores, ports, and
threads.
* Removed the "ref" parameter from notify_select_events() and the
select_sync_pool functions as well as from fd_ops::fd_[de]select(). It
is no longer needed. The FS interface select() hook still has it,
though -- the VFS will always pass 0.
* de]select_fd() take a select_info* instead of a select_sync* + ref
pair, now. Added respective functions for semaphores, ports, and
threads.



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


# 245aecda 21-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Got rid of vnode_id and mount_id, replaced with ino_t and dev_t.


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


# ed07b9c7 02-Apr-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

The last missing hooks -- get_vnode_name(), write_attr_stat() and
rewind_query() -- are passed to the userland. get_vnode_name() has an
emulation in userland, in case the client FS doesn't implement it.


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


# 617ed3e4 28-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented the new attribute open/close/... FS hooks. The mapping to the
old interface is completely done in userland ATM.

It becomes more and more obvious that we probably need to provide
the kernel add-on with a bit more information about what the client FS
interface supports in the first place, so we can save unnecessary trips to
the userland. Opening/closing attributes for a FS using the old style
interface could be handled completely in the kernel add-on, for instance
(even if we lose a bit of accuracy wrt to open modes etc.).


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


# 8474904e 27-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Adjusted the FileSystem, Volume, and UserlandRequestHandler to the new FS
interface. The classes actually interfacing with the client FS add-on still
need to be adjusted.


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


# 5d3147f6 26-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Class renaming:
UserFileSystem -> FileSystem
UserVolume -> Volume
KernelUserFileSystem -> BeOSKernelFileSystem
KernelUserVolume -> BeOSKernelVolume

The BeOSKernel* classes are indeed intended to handle FS implementations
that use the (old) BeOS FS interface. We'll see how well that will work.


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


# 83812f67 23-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Copied userlandfs code from the test tree to the haiku source tree,
where it will be ported to Haiku.


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


# ffba66060b0155c987fc2232b803b243610c6430 29-Mar-2015 Michael Lotz <mmlr@mlotz.ch>

UserlandFS: Make 64 bit clean and enable build for x86_64.

I did not bother to fix the BeOS kernel emulation, so this part is
still left out of the x86_64 build.


# 0a1dabca7eb05baaf2f865fbf0012ef9f78060f2 22-Jul-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added public io_request_is_vip(), returning whether the given request has the
VIP flag set.


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


# c77f643a2b3f3990e6f355d6c333537b9cbfd88f 20-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for in-kernel node monitoring ({add,remove}_node_listener()).


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


# 996aa11b171363438cb73abe0426bcc1d81a4a8b 12-Aug-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Spotted by "Blub": After unmounting we didn't delete the Volume object.


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


# e66cd9d71b0ae8fe311674bf7b87cb26d7452b61 02-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* For every request to userland we also send the team/thread/user/group ID of
the current thread, now. Implemented by introducing a new base class
KernelRequest which has respective attributes.
* Server: RequestThreadContext does now also save the request that is being
processed. Furthermore some space has been reserved for file system specific
data, which can be initialized by the new
FileSystem::InitRequestThreadContext().
* FUSE library: Implemented fuse_get_context() using the new
RequestThreadContext feature.


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


# 3cf43c26516b695e35b7433196a530f7541c4ca8 25-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed the fs_vnode_ops::create_dir() parameter for returning the ID of the
newly created dir. The VFS really doesn't need it and for some file systems
it might not be easy to get by. Several file systems (e.g. rootfs and fat)
were ignoring the parameter anyway.


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


# 4649fe05ef03c9981231538121df35aab32f2bc0 17-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Haiku kernel interface emulation: Retrieve the capabilities for each vnode.
We do some caching using a hash table indexed by the operations vector.
* Pass the vnode capabilities to the kernel module.
* In the kernel tailor the operation vectors for volumes and vnodes passed to
the VFS according to the respective capabilities. This way those vectors look
pretty much like those from the client FS. This saves unnecessary calls when
hooks are not implemented and should also fix compatibility problems in cases
where not implementing a hook and returning an error don't mean the same to
the VFS.
* Inlined some of the kernel module Volume class getters.


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


# c76e8d36fb69fa88a01ff734f45523c36629af17 15-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented forwarding the do_iterative_fd_io() callbacks to userland.
* Pass the request offset and length with the DoIORequest. This allows us to
already get the first vecs for do_iterative_fd_io() in userland, saving a
trip back and forth.


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


# 7c1ffcb9ec70c1bb997a4ecb9a9af82d5a657297 13-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* The nature of asynchronous I/O is to be asynchronous. So we can't store
an on-stack structure for the request in a hash table when forwarding the
io() hook. Create a new object (HaikuKernelIORequest) instead and store it
in a hash table in HaikuKernelFileSystem.
* Some work on the userland side of do_iterative_fd_io().
* Added some missing requests in UserlandFSUtil::is_{kernel,userland}_request().


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


# f1c6ce08f25483b1c3f0623e9f203b08222bf936 10-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented the userland side for propagating the io() and cancel_io() hooks.
* Implemented io_request_is_write().


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


# 5b2561a53870d8d850deeacc0c6b6a5a8a0d3688 01-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

A NULL pointer was dereferenced when mounting failed.


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


# b19b5f9dda75cb66cbba96b0fc9bb4ba40760fb5 27-Feb-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

More adjustments to the new FS interface. The enabled sources compile again,
but don't link yet.


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


# cdebdeb0aa35c9eabf093024474c865ce9bd6840 25-Feb-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Some more work towards adjusting the UserlandFS to the current FS interface:
* Split the FSCapabilities bit mask into three bit masks for the FS, the
volume, and the vnodes, since we have three independent FS interface
structures, now. The latter is not supported in the kernel add-on, yet.
* Server:
- Temporarily removed some things from the build (the BeOS interface
and the cache implementations).
- Some WIP in HaikuKernelVolume and [haiku_]kernel_emu.{h,cpp}.
- Added HaikuKernelNode, which wraps fs_vnode for the client FS.
The server is still quite a bit away from being buildable again.


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


# 636bfc08aeaaa7f1bab813c5aa2e8e666b40ec64 02-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Renamed fs/vfs_select.cpp to wait_for_objects.cpp and got rid of
vfs_select.h, respectively moved most of it into the new kernel
private header wait_for_objects.h.
* Added new experimental API functions wait_for_objects[_etc](). They
work pretty much like poll(), but also for semaphores, ports, and
threads.
* Removed the "ref" parameter from notify_select_events() and the
select_sync_pool functions as well as from fd_ops::fd_[de]select(). It
is no longer needed. The FS interface select() hook still has it,
though -- the VFS will always pass 0.
* de]select_fd() take a select_info* instead of a select_sync* + ref
pair, now. Added respective functions for semaphores, ports, and
threads.



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


# 245aecda8ac43fc2c0c0bac6a7e4016efa9b71e1 21-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Got rid of vnode_id and mount_id, replaced with ino_t and dev_t.


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


# ed07b9c7e338367449b81e28a8d2114f07666c1c 02-Apr-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

The last missing hooks -- get_vnode_name(), write_attr_stat() and
rewind_query() -- are passed to the userland. get_vnode_name() has an
emulation in userland, in case the client FS doesn't implement it.


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


# 617ed3e4a9ea91cf5be9b9e55d465840c36b1639 28-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented the new attribute open/close/... FS hooks. The mapping to the
old interface is completely done in userland ATM.

It becomes more and more obvious that we probably need to provide
the kernel add-on with a bit more information about what the client FS
interface supports in the first place, so we can save unnecessary trips to
the userland. Opening/closing attributes for a FS using the old style
interface could be handled completely in the kernel add-on, for instance
(even if we lose a bit of accuracy wrt to open modes etc.).


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


# 8474904ee0f43a32780687a6648c5b1a9b77b3c4 27-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Adjusted the FileSystem, Volume, and UserlandRequestHandler to the new FS
interface. The classes actually interfacing with the client FS add-on still
need to be adjusted.


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


# 5d3147f66a54bd98707e1801e6f14cb29de72631 26-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Class renaming:
UserFileSystem -> FileSystem
UserVolume -> Volume
KernelUserFileSystem -> BeOSKernelFileSystem
KernelUserVolume -> BeOSKernelVolume

The BeOSKernel* classes are indeed intended to handle FS implementations
that use the (old) BeOS FS interface. We'll see how well that will work.


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


# 83812f67529c88d4fb4b942162a9f21142e683fa 23-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Copied userlandfs code from the test tree to the haiku source tree,
where it will be ported to Haiku.


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