370 Commits

Author SHA1 Message Date
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
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
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
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
Axel Dörfler
55b5474b8b Added _PACKED to the on-disk structures.
Switched to kernel_cpp.h/cpp.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6287 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-25 14:38:51 +00:00
François Revol
32e3f99972 Debug Inode ctor/dctor; fix printf args warnigns
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-25 13:36:13 +00:00
Bruno G. Albuquerque
fbe89ed67b We forgot about the B_MIME_STRING_TYPE when creating indices and the BEOS:APP_SIG index was failing to be created. It looks the registrar calls the index creation with that type although it is not directly available in the command line tool mkindex, for example.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6274 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-25 11:03:23 +00:00
François Revol
91e6897c63 Added obfsinode kernel debugger command.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-25 00:11:34 +00:00
Axel Dörfler
40997e1444 Added the _PACKED attribute to the BFS on-disk structures to be sure
the compiler doesn't break anything by aligning them differently.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-21 15:57:03 +00:00
Tyler Dauwalder
f3062637c3 Removed unused definitions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-20 06:23:42 +00:00
Tyler Dauwalder
063b74d2f0 Switched from USER to _KERNEL_MODE for detecting user vs. kernel versions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-20 06:23:08 +00:00
Tyler Dauwalder
e9927e2b64 - Switched from USER to _KERNEL_MODE for detecting user vs. kernel versions.
- Added UDF 1.50 support code
- Added empty functions to file_icb_entry() to make its interface compatible
  with extended_file_icb_entry().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-20 06:22:25 +00:00
Tyler Dauwalder
f1ee5f11af - Added check of udf revision.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-20 06:20:26 +00:00
Tyler Dauwalder
8c32c26731 - Actually set Cs0 length in Cs0 SetTo() now.
- Updated constructors/SetTo()s that take array<char>
  params to expect d-strings instead of Cs0 strings.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-15 01:12:45 +00:00
Tyler Dauwalder
3bfc8fdd89 Added check for udf implementation use descriptor in vds.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-15 01:11:37 +00:00
Tyler Dauwalder
301e9f216f #if'd out debug code in udf_release_vnode() when DEBUG_TO_FILE is enabled.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6021 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-11 21:56:46 +00:00
Tyler Dauwalder
bb4462fd33 Added call to remove_cached_device_blocks() in _Unset().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6020 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-11 21:55:49 +00:00
Tyler Dauwalder
161f777667 Fixed a warning.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6019 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-11 21:55:22 +00:00
Tyler Dauwalder
ab2b3ca0c9 Now actually copies utf8 string in utf8 SetTo().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6013 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-11 05:41:22 +00:00
Tyler Dauwalder
9a043bf95f Added:
- struct logical_volume_info
- struct udf_id_suffix
- kLogicalVolumeInfoId constant


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-10 09:32:48 +00:00
Tyler Dauwalder
80b849abc7 - Added flags and unique_id fields to file_id_descriptor.
- Fixed implementation_use_length field in file_id_descriptor.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-09 09:58:30 +00:00
Tyler Dauwalder
10186d5dda Fixed a myriad of stupid errors, oversights, and miscalculations caught by Phillips' handy-dandy UDF verifier.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-07 08:27:03 +00:00
Tyler Dauwalder
b2322fd1e0 Added check for existence of unallocated space descriptor in volume descriptor sequence.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5967 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-07 08:25:55 +00:00
Tyler Dauwalder
57c80a0c50 Added DString.cpp.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-07 08:25:24 +00:00
Tyler Dauwalder
3871cd303a Initial checkin. Class for creating UDF fixed-length-field d-strings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-07 08:24:55 +00:00
Tyler Dauwalder
b3a4ae39dd - Further rounded out logical_volume_integrity_descriptor
- Fixed some broken pointer arithmetic.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-06 06:08:50 +00:00
Tyler Dauwalder
8d3a43fbd0 Messed with the #includes, which still need some cleaning up.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-06 06:05:58 +00:00
Tyler Dauwalder
f50008f9ba Switched back to new(nothrow), now that it works properly again.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-06 06:05:31 +00:00
Tyler Dauwalder
495b7e4743 Added verification of logical volume integrity sequence.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-04 09:59:20 +00:00
Tyler Dauwalder
663f03ef0e Undid switch to new(nothrow), which I'd thought compiled properly but apparently didn't.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-04 09:58:22 +00:00
Tyler Dauwalder
335fd88306 Polished up logical_volume_integrity_descriptor.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-04 09:57:30 +00:00
Tyler Dauwalder
2cf79bd296 Moved block_for_offset() from Utils to UdfBuilder.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-04 09:56:45 +00:00
Tyler Dauwalder
2b215e7a92 - Fixed 16-bit compressed unicode string creation, which was apparently
seg-faulting due to unaligned memory accesses.
- Switched from new to new(nothrow).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-03 01:59:33 +00:00
Tyler Dauwalder
e376a854f6 Turned off block-cache-disabling for userland mode.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-02 02:54:25 +00:00
Tyler Dauwalder
533f9c6b62 Added block_for_offset()
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-02 02:54:01 +00:00
Tyler Dauwalder
4f0e6a75b3 Added partial allocation descriptor dumps in icbs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-02 02:51:16 +00:00
Tyler Dauwalder
5198a15dbc Replaced user- and kernel-specific includes I accidentally removed previously.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-02 02:50:31 +00:00
Tyler Dauwalder
4224781a31 More debugging output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-02 02:49:52 +00:00