868 Commits

Author SHA1 Message Date
Axel Dörfler
db88a56aa8 Now calls the new fs_shell only call kill_device_vnodes() in Volume::Initialize()
to be able to remove the cache correctly (without issuing any warnings).
The Volume::Initialize() method is now only defined in USER mode (of course, this
will change in OpenBeOS).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-03 02:14:51 +00:00
Rudolf Cornelissen
f6ee725658 corrected 'typos'
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-02 13:07:10 +00:00
Axel Dörfler
5b25332a79 This should fix the recently introduced locking problems:
- locking policy is now: 1) the volume lock, 2) the inode lock, 3) start
  the transaction (the journal lock) - you don't need all locks, but you
  have to follow this order when you need more than one of them.
- in many cases, this makes our inode read/write lock useless. I am really
  looking forward to the OpenBeOS VFS layer where we can remove many of
  these locks again.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-02 01:50:00 +00:00
Rudolf Cornelissen
5a84c3b178 updated overlay scaling remarks, final 0.08 version
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6460 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-01 21:35:09 +00:00
Rudolf Cornelissen
bdad933375 CRTC1/2 mode granularity updates again
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-01 12:58:48 +00:00
Rudolf Cornelissen
1263890952 added output follows monitor feature
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-31 16:21:14 +00:00
Axel Dörfler
36660c5e99 Switched from direct get_vnode() usage to the Vnode class.
Now acquires the volume lock always before get_vnode() is called as long
as UNSAFE_GET_VNODE is defined (which now is by default).
May cause some unwanted side-effects; it still has to be thorougly tested.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-30 00:47:56 +00:00
Axel Dörfler
b39a7a0edd Fixed the "inode is not becoming unbusy" problem.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-29 23:46:23 +00:00
Axel Dörfler
01338285a9 Some minor style changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-29 22:19:17 +00:00
Axel Dörfler
73e3e50c41 Fixed the bug that caused the "vnode already exists with different cookie"
crash: bfs_inode::InitCheck() didn't check INODE_DELETED, and Inode::Remove()
didn't clear the INODE_IN_USE flag (as the original BFS, IIRC).
Some more debug output and checks.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-29 22:14:07 +00:00
Axel Dörfler
fc2f5c4f98 Fixed working with volume without indices - in case of a corrupt indices node
the Inode will now be deleted, and it will only be tried to be instantiated
if the indices block_run is not zeroed out.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-29 10:45:54 +00:00
Axel Dörfler
403d1302de Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-29 10:44:18 +00:00
Rudolf Cornelissen
203b86df50 added dualhead switch mode
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6403 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-29 10:37:50 +00:00
shatty
162cf2d0a5 fix build problem
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-29 03:50:48 +00:00
Axel Dörfler
11805f2d85 BlockAllocator::InitializeAndClearBitmap() now also sets the used_blocks
field of the super block correctly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-28 23:12:59 +00:00
Axel Dörfler
3bb10b9323 The standard indices are now created when a volume is initialized.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-28 23:07:52 +00:00
Axel Dörfler
b41bf79188 Standard log size is 2048 blocks, not 4096...
Added a ToDo comment so that I don't forget to add the standard indices :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 22:41:32 +00:00
Philippe Houdoin
ce5d0dee99 Ooops, Francois Revol's floppy driver is supposed to target R5 kernel, not yet OBOS one.
Commented out OBOS kernel build rules, and now build for R5.
NOTA: It's a PIO-read-only implementation currently.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 20:57:29 +00:00
Rudolf Cornelissen
b1332f1955 corrected typo
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 13:19:00 +00:00
Rudolf Cornelissen
cc6f554257 added overlay follows head functionality
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6357 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 12:17:51 +00:00
Axel Dörfler
a49b150fff Removed the fOwningThread functionality from the Journal class; it now
just uses a RecursiveLock instead.
Changed Journal::CurrentTransaction() so that it returns the current
transaction only if it's valid for the thread asking for it.
That doesn't fix the bug, but changed its timing a bit.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 11:19:05 +00:00
Axel Dörfler
0057030901 Added some more debug output and checks.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 11:15:43 +00:00
Axel Dörfler
d401c62383 Fixed typo.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 11:14:37 +00:00
Axel Dörfler
8364cf0a90 Added a LockWithTimeout() method to the RecursiveLock class.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 11:11:18 +00:00
Axel Dörfler
3eacb520e4 The InodeAllocator will now remove the INODE_NOT_READY flag to unblock
any pending bfs_read_vnode() calls when it is destructed and the inode
goes away.
Fixed some endian related issues.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 09:54:47 +00:00
shatty
b83b512f83 relocated kernel_cpp.h requires different UsePrivateHeaders
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 08:55:46 +00:00
shatty
06276e0a97 tiny debug compile fix
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 08:48:15 +00:00
François Revol
40492c28e8 More warning fixes; fixed Axel's mess (thanks anyway :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 08:36:31 +00:00
Axel Dörfler
d61e7f330a Wrote a simple algorithm to create appropriate allocation group values
for newly initialized disks. Should work for all sizes :-)
Documented a bit what good values actually mean.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 02:26:22 +00:00
Rudolf Cornelissen
e0dd08e80c fixed move_display distortions (both heads)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6333 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 20:20:18 +00:00
Rudolf Cornelissen
693152bfa2 Added dualhead support for 8- and 16bit colordepths
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 16:49:49 +00:00
Rudolf Cornelissen
4b47486ee5 updated mode granularity checking / max virtual size limiting for dualhead cards
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 15:06:35 +00:00
Axel Dörfler
965c8c8b4d Fixed the Volume::Mount() call; BlockAllocator::Initialize() was never
called since last change (could mount volumes, but cannot write to them
anymore without errors).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 12:29:26 +00:00
Axel Dörfler
c4e3ef09c4 Removed the makefile, since it's not used at all.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 10:38:38 +00:00
Axel Dörfler
6b6b3d294b Fixed all warnings.
Renamed DPRINT() to the more common (in our codebase) TRACE().
print_sr0() is only compiled in and called if DEBUG is defined.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 10:28:16 +00:00
Axel Dörfler
fb86eb2c00 Fixed all warnings, added license.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 09:53:51 +00:00
Axel Dörfler
322defd113 Accidently broke the build by allowing kernel_cpp.cpp to be built without
having access to private/kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 09:33:31 +00:00
Axel Dörfler
9e72b7739d Inode::Create() now prints out a reason if new_vnode() failed.
If the parent is NULL, Inode::Create() will now set node::parent to
the node itself, like BFS is doing it (for root and indices nodes only).
Added a temporary hack in Volume::Initialize() to get the inodes freed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 03:38:08 +00:00
Axel Dörfler
ddf3d84685 Removed debug output, set mode of newly created root node to 0755 instead of 0777.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6319 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 03:20:07 +00:00
Axel Dörfler
aac1dff951 Updated the comment in bfs_initialize() - which we don't need for R5 (as it's
never called).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 02:45:54 +00:00
Axel Dörfler
3154133754 Moved the functionality of Volume::IsSuperBlockValid() into the new
disk_super_block::IsValid() method.
There is now a disk_super_block::Initialize() method that sets up
a super block for creating a new file system on it - it's currently
hard coded to produce correct results for 10 MB images, though;
the allocation group stuff has to be done a bit more flexible :)

Added a DeviceOpener class that simplifies Volume::Mount() a bit and
fixes some problems of it (forgot to call close() once or twice).
Implemented the new Volume::Initialize() method that completely
covers the mkbfs functionality.

Fixed the broken Volume::ToBlockRun() method - AFAICT it has only
be used by Volume::CreateIndicesRoot() and in dump_bplustree_node
so far (should not have been critical, as the former was probably
never called yet [only if you had tried to create an index on a
BFS volume that didn't have indices yet]).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6313 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 02:44:27 +00:00
Axel Dörfler
d7db210882 Fixed a bug that could happen when calling Inode::Create() with unusual
arguments (such for creating a root directory, for example).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 02:08:31 +00:00
Axel Dörfler
81566b9389 Implemented initalizing the bitmap of a fresh volume in the new call
BlockAllocator::InitializeAndClearBitmap().
Added BlockAllocator::BitmapSize() which returns the size of the block
bitmap in bytes - used it where appropriate.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 02:06:47 +00:00
François Revol
4d8c3e52a9 Fixed prototype names
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6302 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-25 20:31:53 +00:00
Axel Dörfler
67a14a5ee7 Unbroke the debug build (also in user mode).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-25 15:03:38 +00:00
Axel Dörfler
ba6b73149c Not needed anymore, now uses kernel.cpp/h (same thing, just in a standard location).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-25 14:50:09 +00:00
Axel Dörfler
54343bbc2d Switched to kernel_cpp.h/cpp.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-25 14:48:40 +00:00
Axel Dörfler
aef00d7b03 Cleaned up the debug mess mmu_man has created (thanks anyway!).
Fixed a bug where the debug commands would be added in bfs_mount(), but
not removed (since bfs_unmount() is only called if bfs_mount() doesn't
fail).
Switched to kernel_cpp.h/cpp.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-25 14:46:24 +00:00
Axel Dörfler
a893229e08 Cleaned up the debug mess mmu_man has created (thanks anyway!).
Switched to kernel_cpp.h/cpp.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-25 14:44:51 +00:00
Axel Dörfler
b53b9c0cd9 Cleaned the debug mess mmu_man created (thanks anyway).
Switched to kernel_cpp.h/cpp.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-25 14:43:37 +00:00