Commit Graph

214 Commits

Author SHA1 Message Date
Ingo Weinhold ee1a1571a2 Implemented a simple directory entry cache to speed up path resolution.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-08 05:08:37 +00:00
Ingo Weinhold 4612433715 * Added parameter "size_t align" to file_map_translate(). If > 1, the
vector at the end of the file will be aligned to the given value.
* BFS uses an alignment of 512 bytes (should be block size of the
  underlying device or BFS block size, whatever is less), which should
  be fine, since file data are only stored in BFS blocks. This totally
  avoids any partial operations at the I/O scheduler level, thus saving
  disk operations. Not that I could measure any performance difference.
  Theoretically it should help a lot though, particularly when dealing
  with lots of small files, since we avoid using bounce buffers, which
  are (a) limited in number and (b) require copying of the data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-30 23:06:28 +00:00
Axel Dörfler 06ba3f0acb * Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
    a predefined location on disk (not yet implemented). This would also allow
    to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
    icons for those.
  - B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
  variants that can also retrieve the icon data directly (like
  BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
  Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
  special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 11:27:07 +00:00
Axel Dörfler 70e2d4ac43 * Replaced the B_BLOCK_DEVICE_* defines with B_DMA_* defines that better match
our dma_restrictions structure (but we're using blocks instead of bytes,
  since unlike the block size, the restrictions attributes are constant).
* We might want to use blocks for the dma_restrictions structure as well in
  the future...
* Fixed another bug in the device_node variant of DMAResource::Init(): the max
  segment size was specified in blocks as well.
* Removed the "hardcode" block_io module and header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 15:08:16 +00:00
Axel Dörfler 24593e2c79 * First baby steps in letting our drivers use the new I/O request/scheduler
architecture: for now, we do this on the lowest layer only, therefore all
  requests are handled synchronously (ie. in the scheduler's thread).
* Instead of using the block_io module, scsi_disk (and scsi_cd) are now
  exporting a device on their own, and use an I/O scheduler with an appropriate
  DMA resource.
* There are still lots of TODOs, and it can easily panic - don't update if
  you intend to demo Haiku.
* scsi_periph now only has an io() function that get an io_operation, instead
  of the previous read/write functions, moved preferred CCB size from those
  functions into the device registration.
* Changed all scsi_periph files to C++.
* scsi_cd ported, too, but untested.
* Removed block_io from image - it will be removed completely soon.
* Temporarily commented an ASSERT() in the ATA bus manager (in case you use
  it); it's sometimes triggered by the code now, and I haven't yet looked into
  the issue -- doesn't seem to harm, at least.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 21:11:51 +00:00
Axel Dörfler 3c1a3047a4 * Added file_cache_is_enabled() function.
* Added file_map_set_mode() function that you can use to keep a whole file
  cached. This is needed for the swap file support: FILE_MAP_CACHE_ALL will
  not only precache all file_io_vecs when called, but it will also cause all
  file_map_translate() calls to fail that would require further caching (ie.
  if the file size had changed).
* Updated the fs_shell file map code to the latest one (with several bug fixes).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 08:28:17 +00:00
Ingo Weinhold 7491000f20 Added functions file_cache_{disable,enable}(). They allow to disable
actual caching in the file cache, i.e. all reads and writes go directly
to the underlying device. The implementation is not quite complete,
since the VM can still add pages to the cache when the file is mmap()ed,
which can lead to inconsistencies.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 03:15:50 +00:00
Axel Dörfler 9f6ae76f02 * Added acquire_vnode() call that you can use to get another reference to an
inode - unlike get_vnode() the busy flag won't prevent you from getting that
  reference.
* Changed put_vnode() to return an error in case the vnode couldn't be found.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-01 09:59:19 +00:00
Ingo Weinhold 7f12cc54a7 * It is now supported that I/O operations and requests are only handled
partially (e.g. due to hitting the end of file). The respective
  classes have grown new methods and attributes to deal with that. The
  "finished" callbacks have got additional parameters to indicate
  whether the transfer was only partial and how much has been
  transferred. Other callbacks and functions have a size_t* in/out
  parameter instead of a simple size_t, now.
* vfs_{read,write}_pages() do now use the I/O request framework instead
  of the underlying FS's {read,write}_pages() hooks (those should be
  unused now). Furthermore they've got an additional "flags" parameter,
  which is passed to IORequest::Init(), i.e. it allows to specify that
  the given vecs refer to physical addresses.
* The file cache's read_into_cache() reads directly into physical
  pages, now.
* Fixed bug in DoIO::IO(): The offset was not adjusted, so that all
  pages were incorrectly transferred from/to the same location.
* Fixed broken subrequest scheduling loop head in
  do_iterative_fd_io_iterate().
* Adjusted the test driver and implemented its io() hook. Using this
  driver I/O requests are passed all the way from the VFS/VM to the
  driver and through the I/O scheduler. It even seems to work. :-)
* Added missing const to the iovec* parameter of the IORequest::Init()
  methods.
* Disabled some debug output by default. Added new optional debug
  output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-30 23:34:10 +00:00
Ingo Weinhold 7df40c23f6 Added handy function volume_for_vnode() which returns the fs_volume for
a given given fs_vnode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 23:33:49 +00:00
Ingo Weinhold ec598fe493 * Added FS interface hooks io() and cancel_io(). The former is supposed
to provide asynchrounous (or only synchronous, if asynchronous is not
  supported) I/O request support. It will eventually replace
  {read,write}_pages(). None of the FS implementations implement them
  yet.
* Implemented some support functions for request-based I/O. File system
  implementations can use do_fd_io() which passes an I/O request to the
  layer responsible for a given FD, and do_iterative_fd_io(), which
  translates a request for a file to subrequests for the underlying
  device and passes them on. Both fall back to synchrounous processing
  when the io() hook is not supported.
  Furthermore added vfs_synchronous_io() which should be handy for the
  devfs to perform io_requests synchronously for devices that don't
  support the io() hook.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26655 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 02:07:20 +00:00
Ingo Weinhold 6e60a6ac03 Added function get_memory_map_etc() which works similar to
get_memory_map(), but has a saner semantics and allows specifying a
team.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-24 04:07:14 +00:00
Ingo Weinhold 902559ce32 * Added a mutex to IORequest. It doesn't look like we can get around
using a lock and I'm not very much in favor of a global one.
* Added "finished" callback to IORequest.
* IOOperation::Finish() no longer invokes its parent request's
  ChunkFinished(). The finisher does this instead. ChunkFinished()
  can optionally remove the chunk from the parent.
* Added IORequest::Wait() which waits for the completion of the request.
* Introduced IORequestChunk::ResetStatus() to make setting the status to
  "pending" somewhat more explicit.
* Implemented the missing IOScheduler::SetCallback() methods.
* The NotifyAll() calls on the IOScheduler's condition variables were
  missing, so it just waited forever.
* Added some more debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-24 01:54:41 +00:00
Ingo Weinhold e6bd90c58d * bfs_fsync() was the only place which could cause the
fs_vnode_ops::write_pages() to be called with fsReenter = true. Since
  this is no longer the case, the argument has become superfluous. For
  read_pages() it always was. Removed the argument from the functions
  and all functions that propagated it.
* Some whitespace at the end of lines was removed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26579 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 15:47:47 +00:00
Axel Dörfler 6db6b628d6 * Added B_PHYSICAL_BASE_ADDRESS address specification for anonymous areas.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 23:32:25 +00:00
Axel Dörfler 736352dcf5 * Added [un]lock_memory_etc() versions that accept a team_id as first argument.
This allows drivers to lock the memory outside of the original team context.
* create_area_etc() got a struct team as first argument, but that should have
  been a team_id.
* Removed delete_area_etc() - there is already vm_delete_area() doing the same
  thing.
* Renamed vm_get_address_space_by_id() to vm_get_address_space(), as there is
  no other method of getting an address space.
* Removed erroneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 22:55:17 +00:00
Ingo Weinhold f9f2d81621 Added helper function get_default_partition_content_name() that can be
used by file systems to get a useful name, if the file system (or just
that specific volume) doesn't have one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26403 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-13 12:50:35 +00:00
Ingo Weinhold 60f2ef17be * Added "partition_id partition" field to fs_volume, so that file
systems can get the partition they reside on easily.
* Updated TODO.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-13 12:47:08 +00:00
Axel Dörfler 0dedf9f081 * Removed the now superfluous pnp_devfs.h header.
* There was a leftover in devfs that still needed it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-04 10:38:59 +00:00
Jérôme Duval a5f249c795 use the typedef
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-03 20:13:59 +00:00
Ingo Weinhold 1c8de8581b * Added optional spinlock contention measurement feature. Enabled when
B_DEBUG_SPINLOCK_CONTENTION is defined to 1. It typedefs spinlock to a
  structure (thus breaking BeOS binary compatibility), containing a
  counter which is incremented whenever a thread has to wait for the
  spinlock.
* Added macros for spinlock initialization and access and changed
  code using spinlocks accordingly. This breaks compilation for BeOS --
  the macros should be defined in the respective compatibility wrappers.
* Added generic syscall to get the spinlock counters for the thread and
  the team spinlocks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-02 02:04:12 +00:00
Axel Dörfler fc128a4c76 * Made block_io.h usable from C++ (which doesn't like "typedef a *a" anymore).
* Renamed scsi_dsk to scsi_disk.
* Joined all scsi_disk sources together to a single scsi_disk.cpp file.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25737 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-31 11:59:02 +00:00
Axel Dörfler 44b6c0f4b6 Oops, this shouldn't have been part of this file, forgot to delete it when
copying from the playground.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 12:28:13 +00:00
François Revol 5bd8987ff0 fix C++ linkage of global var... it shouldn't be here anyway, but I suppose it's temporary.
This should fix the (gcc4 at least) build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 11:25:33 +00:00
Axel Dörfler 368167ede8 * Integration of the new driver architecture.
* Moved devfs from fs/ to device_manager/, and separated the legacy driver
  support from it.
* Removed fast_log module.
* There are a couple of (temporary) regressions, though:
  - legacy SATA and ISA IDE support is disabled, the drivers haven't been
    ported yet.
  - The not yet used ATA bus manager hasn't been ported yet, either.
  - AHCI changes have not been tested.
  - the listdev command has been removed from the build (as it currently
    doesn't work anymore).
  - device manager generated IDs currently are not freed anymore when a device
    node is removed.
  - generic drivers can't yet use the new driver architecture.
  - simple busses that do not support device types won't work yet.
  - legacy driver publishing/unpublishing (ie. what USB needs) has not been
    tested, and may be broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-26 16:52:27 +00:00
Marcus Overhagen 33e9755153 Small cleanup of ahci driver. Also clear the PCI interrupt disable bit during setup.
Add PCI command ID (interrupt disable) define to PCI.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 13:40:58 +00:00
Marcus Overhagen 694c3b75f4 fix bridge control register size
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 21:21:39 +00:00
Marcus Overhagen 1eace5fc53 fixed typo again ;)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 20:59:14 +00:00
Marcus Overhagen be121a1c53 fixed typo
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 20:57:49 +00:00
Axel Dörfler 1da9f5cea5 * Added BDiskSystem::ShortName() and everything needed to get it there.
* Added BDiskDeviceRoster::GetDiskSystem() method, that can get a disk system
  by short/pretty/module name - since they should all be unique, I put them
  in a single namespace, please complain if you don't like that :-)
* Cleaned up DiskSystem.h and DiskDeviceRoster.h according to the updated
  header guidelines.
* Renamed ntfs pretty name from "ntfs File System" to "Windows NT File System".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25414 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 11:44:00 +00:00
Axel Dörfler 359f758bc4 * Added PCI_hd_audio sub-type in the PCI_multimedia base class.
* Fixed some minor typos.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 12:42:33 +00:00
Ingo Weinhold 2428097297 Removed superfluous uint32 ref parameter from select() FS hook.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-30 00:06:17 +00:00
François Revol d4a5975f50 - some fields needed to build usb_serial
- use the dano version by default
- s/ddraquire/ddaquire/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 23:52:58 +00:00
François Revol 3196359ad2 - some more defines
- the dano version is exposed as v1.1 so drivers can use select with a simple ifdef
- add copyrights from the tty driver as I'll be copying code from it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 21:56:46 +00:00
François Revol 42889352f8 A stubbed tty bus manager.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 21:20:13 +00:00
François Revol 807cf76df0 memory barrier functions available for drivers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 15:18:04 +00:00
Axel Dörfler 45e95a057f * Removed the old net_stack driver code, and the kernel socket interface.
* Also removed the header files that belong to those files.
* Only kept the userland_ipc.h header for now, to remember us about the
  former userland server driver (that I also removed - it can always be
  resurrected from SVN if needed).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 12:42:25 +00:00
François Revol 716bba3eae start of a header for a beos compatible tty module.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 23:29:45 +00:00
Axel Dörfler 8b79f1fd68 * Added open_module_list_etc() that also allows to specify a required name
suffix. You can use this to verify the version of a module_info structure.
* Made module_info::std_ops optional.
* Minor cleanup in module.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 14:36:04 +00:00
Axel Dörfler 037f70947f * Cleaned up KernelExport.h completely, removed deprecated and non implemented
API, uses the _PRINTFLIKE macro where appropriate.
* Got rid of the "qent" structure, struct timer now contains everything we
  need. This makes the affected code in sem.cpp, signal.cpp, and timer.c much
  cleaner, and resolves a few TODOs.
* Minor cleanup in vfs.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 14:21:06 +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
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 16d8ff2dad * Added a TRANSACTION_IDLE notification that is sent when the transaction
hasn't been used for more than 2 seconds.
* Replaced the block_cache::lock benaphore with a recursive lock, so that
  you can call cache functions from within the notification listeners.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24737 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-02 09:37:22 +00:00
Axel Dörfler a121b8c83c * Added a new flag for write stat: B_STAT_SIZE_INSECURE that allows a
file system to not fill newly created space with zeros. 
  BFile::SetSize() now uses this, while [f]truncate() does not. This
  is only a temporary work-around until BFS supports sparse files.
* Apps that want to reserve space to fill up later should use 
  BFile::SetSize() for now, as this will be a lot faster than 
  [f]truncate().
* cache_io() and the functions below now use a special mode when you 
  pass in a NULL buffer: for read access, the cache is only populated
  (useful for prefetching), for write access, the file is filled with
  zeros.
* Implemented BFS's Inode::FillGapWithZeros() using this method now.
* Removed extraneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 13:39:02 +00:00
Axel Dörfler 5e2ef462ec * Got rid of the duality of FS_WRITE_STAT_* vs. B_STAT_* flags (removed
the former ones).
* Removed extraneous white space.
* net_server settings are now also updated when the size of the 
  file changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 12:04:47 +00:00
Philippe Houdoin 6198a9798e Made DPC module binary compatible with BeOS one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-06 23:10:13 +00:00
Michael Lotz f87d72d788 Introduce a B_NO_LOCK_VECTOR flag to be used with install_io_interrupt_handler().
When specified it desigantes that the interrupt handler should not lock the
vector with a spinlock when executing the installed interrupt handlers. This
is necessary to allow the same interrupt vector to be handled in parallel on
different CPUs. And it is required for the CPU halt to work synchronously when
there is more than one AP CPU. Though the acquire_spinlock() should cause IPIs
to be processed, only this fixed the SMP_MSG_FLAG_SYNC problem for me.
Not locking is safe as long as it is guaranteed that no interrupt handler is
registered or removed while the interrupt handler is running. We can guarantee
this for the SMP interrupt handlers we install in arch_smp_init() as they are
never uninstalled. Probably this flag should be made private though.
Restored the SMP_MSG_FLAG_SYNC when entering the kernel debugger.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-03 16:16:17 +00:00
Axel Dörfler 5d0afa4e4e * cache_detach_sub_transaction() didn't really work: it did not put all needed
blocks into the new transaction, but it would set that transaction on all
  blocks of the old transaction, too. Also, it did not correctly update the
  num_blocks/sub_num_blocks fields of the old transaction. Even worse, it did
  return B_OK instead of the ID of the new transaction...
* get_writable_cached_block() did not correctly maintain the number of blocks
  in the sub transaction.
* write_cached_block() did not free the original_data of a block when it wrote
  it back as part of a previous transaction.
* Changed "cookie" for cache_next_block_in_transaction() to "long", so it will
  be 64 bits when needed.
* Improved the API for detaching sub transactions: you can now get the blocks
  of only the main (parent) transaction as well, added new
  cache_block_in_main_transaction() function.
* BFS now flushes the log when there is no space left for the current
  transaction.
* _WriteTransactionToLog() allocated a "vecs" array, but never freed it.
* _WriteTransactionToLog() now also supports detaching the current sub
  transaction if the whole thing is getting too large (it will now also panic
  if that doesn't work out).
* Removed a useless optimization: making the blocks available in the cache
  isn't really needed, as all blocks in a transaction are locked into the
  cache, anyway.
* Implemented Transaction::WriteBlocks().
* Minor cleanup, removed some dead code, fixed warnings in the fs_shell's
  block_cache when compiled with debug output on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-18 17:07:18 +00:00
Ingo Weinhold 1839792524 Change parse_expression() return value from uint32 to uint64.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-16 22:55:39 +00:00
Axel Dörfler 4fc4f2c8ae * Added a transaction listener mechanism to be notified when a
transaction ends or has been aborted.
* BFS now listens for transactions when it created an inode to see if 
  the transaction will be aborted without freeing the inode (in which 
  case it will panic for now).
* Started implementing tracing support, but it's not working yet.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 17:18:29 +00:00