Commit Graph

23659 Commits

Author SHA1 Message Date
Ingo Weinhold
9583c41d8a Added TODO regarding potential deadlock.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 02:35:07 +00:00
Ingo Weinhold
d4016ffdbb * A pipe can now be inactive and active. After creation it remains
inactive until at least one reader and one writer have opened it. As
  long as it is inactive, reads from and writes to it just block. When
  active, they behave as before (if there's no counterpart writes fail:
  SIGPIPE + EPIPE, reads return 0). When both reader and writer count
  drop to zero, the pipe becomes inactive again.
* Allocate the ring buffer lazily when the pipe becomes active and
  delete it when it becomes inactive.

This makes the pipe implementation FIFO compatible. IOW, FIFOs work as
expected as far as I've tested them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 01:40:01 +00:00
Ingo Weinhold
a8cba5904f The rootfs was calling remove_vnode() on nodes for which it might not
have had a reference.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 00:27:36 +00:00
Ingo Weinhold
717705d816 We get a reference to the node from create_special_node(), so we have to
release it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 00:26:15 +00:00
Ingo Weinhold
7ffafac8d7 * Reorganized the FS interface a little:
- Moved most file_system_module_info hooks into separate structures.
    Those that operate on mounted volumes to fs_volume_ops, those
    operating on a vnode to fs_vnode_ops.
  - Got rid of the fs_volume, fs_cookie, fs_vnode typedefs. We use void*
    again.
  - Instead of a void* volume and node cookie hooks are passed a
    fs_volume and fs_vnode structure pointer, which contain the cookie
    and an ops pointer (fs_volume a few more things).
  - The VFS {new,publish,get,...}_vnode() functions take a fs_volume*
    instead of the volume ID. So does vfs_get_fs_node_from_path().
  - Added type and flags arguments to publish_vnode() and the
    get_vnode() hook and removed the type argument from lookup() hook.
    Added vnode::type using formerly unused bits to store the node type.
    Simplified a few things in the VFS due to the now always available
    node type.
  - Added fs_volume_ops::{create,delete}_sub_vnode() and
    fs_vnode_ops::get_super_vnode() hooks. They are used to support file
    system layers, e.g. allowing to extend an FS not supporting BeOS
    attribute with attribute support. Needs some more work in the VFS.
  - Added fs_vnode_ops::create_special_node() hook for creating special
    nodes (e.g. FIFOs).
* Adjusted the built-in file systems and BFS according to the interface
  changes. Removed all other FSs from the image for the time being.
  We'll see whether further API changes are necessary before porting
  them.
* Adjusted the bfs_shell accordingly.
* Implemented create_special_node() in rootfs to support special nodes.
* Added support for FIFOs:
  - Added syscall _kern_create_fifo() (used by mkfifo()), which creates
    a special node (type S_IFIFO) in the respective file system.
  - When a special node is published the VFS creates a respective sub
    node. Currently only FIFOs are supported.
  - Added a little support for FIFO subnodes by using functionality from
    the pipefs.
  - Added mkfifo to the image. It can create FIFOs in the rootfs, but
    the FIFOs aren't really usable ATM, since they still work like
    pipes, i.e. readers and writers need to have them open at the same
    time.
* Some smaller changes in the VFS:
  - Made the *_CALL macros nicer to use (vargs).
  - Refactored FS entry lookup into new function lookup_dir_entry().
  - create_vnode() no longer just calls the FS create() hook. First it
    looks up the entry and uses open_vnode(), if it already exists. This
    is necessary for two reasons: 1) The FS might not support create()
    while still allowing to open() entries. 2) When the FS has other
    layers on to of it (or the respective node) it might not be
    responsible for opening the node.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 23:05:16 +00:00
Michael Lotz
5d7ee5e84a * Replace the path based lstat in the device watcher with the new device/node
based one. The path based version could not have worked for entry removed
  notifications at all as the node is removed from the directory at this point
  already
* Forgot to delete the device watcher instance after removing all monitors
* The PartitionRegistrar in DeleteDevice() was set to already locked which is
  not the case
* Someone probably forgot to add a PartitionRegistrar to the media checker - it
  did register the device on each run but never actually unregistered it, which
  obviously messed up the reference counting a bit

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 22:08:47 +00:00
Ingo Weinhold
3b9651f3fc Pass "--no-undefined" to the linker when building a shared library for
Haiku. Support for undefined symbols is nice in principle, but not
really needed for building Haiku itself, and can get little annoying, if
one really just forgot to link in a symbol or has a typo in a function
name in C code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24814 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 22:04:28 +00:00
Michael Lotz
efb965d559 Introduce vfs_stat_entry_ref() that allows to stat a vnode based on a dev_t
and ino_t instead of a path. Supposed to work with node monitoring messages.
Took the name from vfs_entry_ref_to_path() that takes the same arguments, but
suggestions for a better name are welcome.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 22:01:05 +00:00
Stephan Aßmus
d0fc7c65c6 Patch by Philippe Saint-Pierre:
* Implemented RLE compression for the boot splash images, resulting in
  smaller kernel and boot loader.
* Only the boot loader contains the RLE compressed images, the decompressed
  buffer for the icons is passed to  the kernel via kernel args.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 21:15:43 +00:00
Michael Lotz
86dd3875cd * Updating device->removed must be protected by the device lock
* Also updating device->open_count must be protected by the device list lock

This fixes the (unlikely) case where a device was removed from usb_disk
standpoint while it still had an open read/write/ioctl operation.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 16:42:34 +00:00
Michael Lotz
b6b5de0741 Use a more reasonable timeout of 1 second for synchronous USB requests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 15:14:30 +00:00
Axel Dörfler
0e4edbeafa * Added checks to (hopefully) all write/create functions to bail out early
if the volume is read-only. This should help with #2028.
* Removed unused bfs_[de]select() functions.
* Removed most paranoia checks - now that we control both sides of code,
  this would just hide eventual problems in the VFS code.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 12:24:11 +00:00
Stephan Aßmus
85f0201086 Rene left tracing turned on in his last commit to this file.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 12:07:10 +00:00
Michael Pfeiffer
e664c41006 Restored the copyright notice before r24684, as pointed out by Marcus Overhagen on the Haiku-commits mailing list, r24684 is a copyright violation.
Also reverted some meaningful comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 11:55:14 +00:00
Axel Dörfler
98b7d71b7c The wait_for_notifications() function now detects if it has been run from
within the notifier/writer thread, and will then flush the notifications
directly. This should fix #2008 again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 10:23:11 +00:00
Axel Dörfler
355914a2cd * Enlarged maximum kernel size to 2 MB - this is the code the boot loader's
MMU code reserves for the kernel, and we hit that limit recently with the
  addition of the boot splash code.
* This fixes the boot crash as triggered by Stippi's recent changes to the
  splash image.
* Cleanup (doxygen comments, line length).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 10:16:49 +00:00
Michael Lotz
b04afa2413 * Another tiny cut in stack load time: do not delay after setting the current
configuration of a root hub
* Cut down on number of retries to set the initial device address

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 00:38:38 +00:00
Michael Lotz
f1a9c3c214 Implement a downcounter for the synchronize cache command. There are devices
that do not support it (probably because they do not have a cache at all like
in flash media) and this should at least avoid spamming the syslog when this is
the case. It will try 5 times and then disable syncing for that device. Untested
as of yet though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 23:46:14 +00:00
Rene Gollent
0ee109102b Forgot about this static function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 23:41:01 +00:00
Rene Gollent
45219b61ea Modify ProcessController's System Resources and Caches item: it
now shows cache and total committed mem respectively.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 23:40:09 +00:00
Rene Gollent
4e103cc0e7 Remove cache mem indicator from this app.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 23:39:30 +00:00
Michael Lotz
a380bc2513 * Add support for devices with multiple LUNs
* A device now has one or more LUNs which are used for LUN specific functions
* Adapted these LUN specific functions to the new design and also change the
  (un-)publishing accordingly
* Handle "no media" cases more correctly
* Output some interesting device infos also with tracing disabled
* Add some more helpful debug output here and there

Devices that provide multiple logical units (like those n in 1 card readers)
should now be usable with usb_disk too. Also we don't fail when a device is
attached which currently does not contain a media. Instead handle media changes
correctly so inserting a media works as expected. Note that hot-unplugging and
media removal still does not quite work right at the devfs or disk device
manager level and easily crashes the system.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 22:51:29 +00:00
Jérôme Duval
f27659f55e * GRAY8 is 8 bits
* typo


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 19:45:11 +00:00
Axel Dörfler
d6e60839e9 * Resolved a TODO: determine the log size depending on the size of the volume.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 19:32:39 +00:00
Stephan Aßmus
75ab36bd50 Refined again the boot splash artwork. Everything is now centered as a whole.
The dividing line is back although with a little more spacing. Also the icon
spacing is a little increased and I added a subtle outline as well as a little
brighter background for the active icon look. The placement logic is now not
independant of each other anymore, otherwise I couldn't center both images
as a unit. But only the vertical placement is affected.
Comments as always on the commit mailing list... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 19:13:00 +00:00
Axel Dörfler
64b7ef1d0f * As briefly discussed in ticket #2024, I've changed BFS to allow to mount
volumes with a broken log. It will only allow the volume read-only then,
  though (unlike Be's BFS), as your disk could be corrupt.
* Added InitCheck() method to the RecursiveLock class, and now only check
  this one in Journal::InitCheck() instead of also replaying the log there;
  this is now done directly in Volume::Mount().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24795 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 18:59:17 +00:00
Rene Gollent
0d69c8378f On my system's BIOS / monitor there seems to be a race condition between grabbing the EDID info
and setting the video mode. The result of this is a garbage display every other boot. By 
introducing a small wait before doing the mode set, it works every time. Will see if I can
reduce the spin timer though with some more tests.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 15:12:11 +00:00
Axel Dörfler
7686d00c6f * This should fix a deadlock as reported by bga.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 15:11:37 +00:00
Axel Dörfler
807d3aa8e3 * If BFS's Journal::_WriteTransactionToLog() noticed there wasn't enough free
space left for the new log entry, it did call cache_sync_transaction(), and
  then just assumed the space would be ready. But since the transaction could
  have been written before that call by the block writer, and since the
  _TransactionWritten() hook is now called asynchronously,
  cache_sync_transaction() actually has to flush all pending TRANSACTION_WRITTEN
  notifications before returning to the caller.
* To implement this, block_cache now publishs a condition variable, and
  wait_for_notifications() adds a fake notification that signals that one.
  Since the notifications are handled in FIFO order, this guarantees that
  the previous TRANSACTION_WRITTEN hook is done.
* notify_transaction_listeners() could accidently delete notifications that
  still had pending signals. Now, it will defer the deletion to the notification
  thread instead in that case. This should fix bug #2008.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 14:02:30 +00:00
Axel Dörfler
0bb7a9c0ca * Journal::_TransactionWritten() updated Volume::LogStart() before it actually
wrote the super block, so there was a race condition with what
  _WriteTransactionToLog() assumed was already written there (if it managed to
  write the log entry before the super block was written by
  _TransactionWritten(), and a reboot happened just then, the log start could
  point to an invalid log entry). Not very likely, but it could happen.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 13:54:18 +00:00
Axel Dörfler
5ebf78f405 * More or less reverted r24782; most ifdef's are NOT needed when running
Haiku code, they work around buggy BeOS code not present on Haiku.
* If this code turns out to be problematic under Haiku (Bruno, did your changes
  make any difference at all?), then please fix the problems in the Storage
  Kit, don't enable work-arounds for BeOS.
* Simplified the macro check as suggested by Ingo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 11:06:33 +00:00
Ingo Weinhold
9181e9cbcf * Used the original size for vmdk Extent Description, not the
sector-aligned one.
* Truncated the image a little too short.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 01:24:26 +00:00
Rene Gollent
ddd25e757b * AboutSystem now shows cache usage together with total/available mem.
* Small cleanups.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 00:40:42 +00:00
Bruno G. Albuquerque
6b0feadc93 - Added Brazilian(ABNT2) keymap originally included in the International
Keymap Pack by ITO, Takayuki and licensed as public domain.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 00:34:11 +00:00
Bruno G. Albuquerque
f040ef9a84 Removed bison and flex as both are now part of the development package.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 00:15:41 +00:00
Ingo Weinhold
702421fa41 Fixed incorrect getopt() specification: -c and -H don't have arguments.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 23:54:55 +00:00
Ingo Weinhold
7c529c2415 * Renamed vmdkheader to vmdkimage and changed it to create a full image
by default (new option "-H" will create the header only). Option "-c"
  will clear the image.
* Adjusted build_haiku_image accordingly. vmdkimage is way faster and
  more portable than the former vmdkheader+dd combo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 21:18:18 +00:00
Jérôme Duval
2608583e58 merging acpica-20080321 in trunk
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 20:49:28 +00:00
Bruno G. Albuquerque
381016e1e0 While tracking a mimeset bug when building under Haiku, I found these. Not sure
if these changes are correct byt they seem to make sense. Ingo?

- Haiku uses the same code that BeOS/Dano/Zeta uses for mime related stuff
  during the build process. Added checking for HAIKU_HOST_PLATFORM_HAIKU where
  relevant.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 20:09:36 +00:00
Ingo Weinhold
5b420b6d10 Replaced "echo -n >" by "touch" as it's more portable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 19:52:43 +00:00
Michael Lotz
463235a9a8 Add the usb_disk driver to the image.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 18:54:10 +00:00
Jérôme Duval
652df41ee5 fix warning
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 18:25:27 +00:00
Jérôme Duval
b5c24e59f2 fix typo
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 18:14:52 +00:00
Michael Lotz
06da81f012 Implement node monitoring in the kernel disk device manager.
* Added {Create|Delete}Device() analogous to {Create|Delete}FileDevice
* Added a small DeviceWatcher class that reacts to entry creation/removal
* Implemented a way to start/stop node monitoring
* Start watching for devices after the boot volume has been mounted and the
  the second initial scan was run

The disk device manager now creates and scans a device when a "raw" node is
published and deletes the device on removal. This makes hot-plugging of disk
devices (for example memory sticks using usb_disk) work. Their partitions will
be scanned and published so they can be mounted. Somehow the removal of the
partitions does not yet work however, any insights are welcome.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 18:14:11 +00:00
Stephan Aßmus
bacaf1148c Don't display error when BRoster::Launch() returns B_ALREADY_RUNNING...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 17:21:34 +00:00
François Revol
dbbf08a95a Just make sure someone copying it as UserBuildConfig will understand what is wrong and where instead of reporting build breakage induced by their misbehaviour.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 14:59:04 +00:00
Axel Dörfler
0f6b6c36dc Added syskonnect driver to the build to close ticket #1945 again that
diver reopened so fast.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24774 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 14:36:39 +00:00
Stephan Aßmus
64379118a9 * Revised boot splash artwork, the logo is back in the lower right corner,
the icons are centered.
* The boot loader and kernel now use the placement info that
  generate_boot_screen now generates.
* Made the code that draws the images handle the case where any of the images
  is larger than the frame buffer.
* All drawing functions need to know the image width (analogous for bytes per
  row).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 14:24:10 +00:00
Axel Dörfler
e63c117011 Looks like some bloke forgot to commit *some* files that should have been part
of r24768 (block cache notification mechanism rewrite).
Thanks for the note, Vasilis!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 14:14:27 +00:00
Axel Dörfler
4b7af69340 * I'm not sure if that puts more or less pressure on stippi, but the
PackageInstaller, ZipOMatic, and the Expander now all have the same
  icon (instead of none, resp. a BeOS bitmap icon).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24771 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 12:39:06 +00:00