Commit Graph

28352 Commits

Author SHA1 Message Date
Ingo Weinhold 270ef7be8c Don't go for pre 2.5 compatibility.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 16:39:46 +00:00
Axel Dörfler 3e9b338ea7 * Applied cleaned patch by Adrian: the gDevices[] can now have empty entries,
the gDeviceNameList[] entries are no longer in the same order.
* This fixes bug #3124.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 16:36:51 +00:00
Ingo Weinhold e72a9b541a Imported FUSE 2.7.4 includes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 16:24:08 +00:00
Axel Dörfler b93ed02c5a * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 16:16:05 +00:00
Axel Dörfler 7ce5cc5505 * Applied patch by Adrian that let the buffer size allocated vary with what
is needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 16:15:49 +00:00
Axel Dörfler 941b2f41ec * Cleanup, added TODO.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29589 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 14:36:19 +00:00
Ingo Weinhold d87fd57ea7 Added UserlandFS optional package.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 14:03:42 +00:00
Ingo Weinhold 12539c39d3 Remove and delete the VNode in _WriteVNode()/RemoveVNode() after the client FS
is done with it, since we still need to serve file cache requests.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 13:25:47 +00:00
Ingo Weinhold 557f6a25da PutVNode(): Switch order of put_vnode() and _DecrementVNodeCount(). After the
put_vnode() might be removed from our map, if that was the last reference to
the node, so _DecrementVNodeCount() would emit an error message -- harmless
but annoying. :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29586 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 13:12:34 +00:00
Axel Dörfler 81824f60e5 * Auto mounting now works correctly for CDs and USB sticks, thus fixing bug
#2629.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 10:17:43 +00:00
Axel Dörfler 8f464bc9ad * Added support for automatic mount on media change. Not yet tested, though,
and probably only works for CDs as is (ie. not for USB sticks).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 08:57:46 +00:00
Axel Dörfler a7ea0713b4 * Now listens to disk device notifications, and rescans its device list when
something comes in -- this could be greatly improved, though.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 08:56:49 +00:00
Axel Dörfler 3f78b216ad * Implemented a basic notification mechanism. Right now, only media changes and
device additions/removals can be monitored.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 08:55:49 +00:00
Ingo Weinhold d95f6cac87 Call file_map_init(). Otherwise the static lock isn't initialized.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 02:06:07 +00:00
Ingo Weinhold c481d02017 BFS happily calls file_cache_{set_size,sync}() with NULL pointers, which the
kernel implementation ignores, so we should allow that in userland, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 02:04:56 +00:00
Ingo Weinhold 5c20c5a552 Replaced the mutex and read-write lock implementations by the kernel code,
too. It's slightly adjusted to use the thread blocking syscalls and a benaphore
style threads spinlock replacement. This solves the following problems:
* The static mutex/rwlock initializers are safe now.
* The rwlock implementation is compatible with the kernel implementation. E.g.
  a write lock owner can acquire a read lock, which would dead-lock before.
* We don't use semaphores anymore. With a userland BFS one could quite easily
  hit the global semaphore limit before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29579 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 02:03:41 +00:00
Ingo Weinhold 4c35c6b5e1 * _user_unblock_thread[s]() also set the user thread's wait_status, now. This
makes them more convenient to use, since the caller doesn't need to know the
  target threads' user thread structure.
* Adjusted the pthread rwlock implementation accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 01:53:06 +00:00
Ingo Weinhold 9e83cc1768 team_free_user_thread(): Unset the thread's user thread before putting it in
the free list. Do that with the threads lock held. This allows other threads
to freely access a thread's user thread structure while holding the threads
lock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 01:46:29 +00:00
Ingo Weinhold e3820a0e5e Fixed several problems related to vnode reference count tracking:
* Increment the vnode reference count in NewVNode().
* Introduced a VNode::published flag that allows PublishVNode() (a) to discard
  the node on error and (b) not to increment the node's reference count in case
  the node had been created by NewVNode() before.
* Added missing fVNodeCountingEnabled check in _RemoveInvalidVNode().
* _PutAllPendingVNodes():
  - nodeFound was never reset, so it would loop forever, if there was at
    least one node that needed to be put.
  - VNode::useCount needs to be set to 0 explicitely. Since vnode reference
    count tracking is already disabled PutVNode() doesn't decrement it and
    thus we would loop forever, respectively cause the VFS to panic() first.
  - If the node has not been published, we need to publish it before putting
    it, since otherwise the VFS would complain that the node is busy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 23:46:56 +00:00
Ingo Weinhold a3bf7dca79 Forgot to add new files. Should have been part of r29572.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 21:51:25 +00:00
Axel Dörfler 9142662b19 * Fixed bug #3574 - this is only a temporary fix, though, as the BControlLook
class must take care of these things.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 19:01:18 +00:00
Axel Dörfler 77e9b77525 * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 18:56:35 +00:00
Ingo Weinhold 4649fe05ef * 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
2009-03-17 18:51:43 +00:00
Ingo Weinhold fabcaf1c0a Added GetHashCode() method and == operator.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 18:30:33 +00:00
Axel Dörfler 96e1ce6604 * Added Expander back to the list of applications. See #3565.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 18:00:10 +00:00
Rene Gollent 440ef69c6b Small oversight: clicking outside of the slider should also dismiss it. Thanks Stephan!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 12:52:32 +00:00
Rene Gollent 12c0fc92e1 Somewhat adjusted the behavior of the volume slider. It now stays up when initially clicked and requires a second mouseclick to begin tracking it. This prevents abrupt volume changes as would be seen if you had previously turned down the volume and then invoked the volume control again (it would immediately jump to whatever level the mouse cursor happened to be at when the slider popped up). This fixes ticket #3570.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 01:34:50 +00:00
Ingo Weinhold bd8837cd1b Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29567 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 01:34:00 +00:00
Ingo Weinhold c7a618a037 Removed work-around for FileCacheReadRequest and TODO for
FileCacheWriteRequest. Stacking requests is now possible, so reentering the
file system while serving those requests is no problem anymore. BFS seems to
be quite happy as far as I've tested it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 01:29:20 +00:00
Ingo Weinhold b19ee1e164 * Port:
- Send() now also gets the message to send as parameter.
  - Added methods to reserve and unreserve space in the buffer.
* RequestAllocator: Uses the port buffer reservation methods now. This allows
  to let more than one RequestAllocator use a Port in a stack-like manner.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 01:24:31 +00:00
Ingo Weinhold c1f05b2803 Got rid of Port::GetMessage[Size]().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 00:46:40 +00:00
Ingo Weinhold 60f4376e26 * Removed the unused Port::SendAndReceive().
* Change Port::Receive() semantics. It does no longer use the buffer associated
  with the object. Instead it allocates heap memory for the caller. Since
  there's only one caller who clones the message anyway, we save one copy this
  way (though we have an additional syscall in userland) and don't overwrite
  a request being prepared for sending.
* Changed RequestAllocator::ReadRequest() to also read the request from the
  port.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-17 00:33:07 +00:00
Jérôme Duval c0f674824c * fixed symlink creation and symlink attributes
* more debug output


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 21:55:50 +00:00
Oliver Ruiz Dorantes 3c2f52ad93 little typo in a company name
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 21:26:58 +00:00
Oliver Ruiz Dorantes b3064a44cf Some corrections to the strings, and cleanups in the Devclass
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 21:24:10 +00:00
Ingo Weinhold 8ed201229d Don't allocate the buffer on early error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 15:52:24 +00:00
Stephan Aßmus a6f9e71c98 This should fix ticket #3481 again. It keeps the same semantics as before when
the header is used for compiling with -std=c99 or -std=gnu99 and GCC4, which
has a reverted meaning of "extern inline" (now standard compliant).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 09:40:33 +00:00
Stephan Aßmus edb449545f Followed David McPaul's suggestion and disabled usage of EBX register in the
libavcodec ASM code to fix the GCC4 build. Tested with GCC4 on Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 09:23:11 +00:00
Ingo Weinhold 4a92b6134f _mutex_trylock():
* The loop is unnecessary, since the call doesn't block anyway, so it can't
  be interrupted.
* Set the holder, if KDEBUG is enabled. Otherwise the panic() in
  recursive_lock_unlock() would be triggered.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 03:34:08 +00:00
Ingo Weinhold 0c9a35e882 * FileCacheReadRequest: Implemented work-around for the problem that
file_cache_read() will reenter the file system which will overwrite the
  buffer associated with the port, so we can't allocate space in the buffer
  before calling it.
* FileCacheWriteRequest still has a similar problem, though it's probably better
  to rethink the kernel-userland communication completely.

BFS basically seems to work in userland, now. Didn't really test write
operations though. They will probably run into problems due to the issue above.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 03:30:52 +00:00
Ingo Weinhold 6747f715cf ReadVNode(): We need to create the VNode object before sending the request
to userland, since typically the file cache for the node is created there
and our FileCacheCreate() method requires and existing VNode object.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 03:21:04 +00:00
Ingo Weinhold efdfca1551 * Added debug output.
* Passing a NULL parameter to file_cache_delete() is OK.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29553 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 03:18:16 +00:00
Ingo Weinhold 8055729289 Fixed debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 03:17:24 +00:00
Ingo Weinhold ebd44d3436 Debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 03:16:36 +00:00
Ingo Weinhold 94ea9b3924 DO_ITERATIVE_FD_IO_{REQUEST,REPLY} were incorrectly categorized by
is_userland_request(), thus triggering a panic()/debugger().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 03:16:17 +00:00
Jérôme Duval 8f29cb488f * added debug output
* don't create the directory with the link name, only the parent


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 00:23:16 +00:00
Ingo Weinhold dfb31b6603 CreateVolume(): Things work way better when actually returning the volume.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 00:05:23 +00:00
Ingo Weinhold 3967230d7f Reverted r29471. It breaks building kernel code including this heaader in
debug mode with gcc 2.95.3.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-15 23:45:05 +00:00
Ingo Weinhold c76e8d36fb * 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
2009-03-15 18:24:14 +00:00
Joachim Seemer 2bb8b19f08 Forgot to re-format the About alert. Oops.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-15 17:47:59 +00:00