[openbeos] Possible BFS Problem
- From: Robert Szeleney <skyos@xxxxxxxxx>
- To: openbeos@xxxxxxxxxxxxx
- Date: Sat, 18 Feb 2006 12:27:59 +0100
Hi!
Found a little problem in SkyFS, which may also still be a problem in
your BFS driver.
Occasionally I get debug logs from people not able to install SkyOS.
Fortunately recently I had this problem too, so I started debugging it.
While installing, suddenly following function fails while trying to
create a directory in /boot/programs:
BlockAllocator::AllocateBlocks(Transaction *transaction, int32 group,
uint16 start,
uint16 maximum, uint16 minimum, block_run &run)
{
...
...
// if we found a suitable block, mark the blocks as in use,
and write
// the updated block bitmap back to disk
if (range >= numBlocks) {
// adjust allocation size
if (numBlocks < maximum)
numBlocks = range;
if (fGroups[group].Allocate(transaction,rangeStart,
numBlocks) < B_OK)
{
printk("blockallocator.cpp: Failed to allocate block");
printk(" group: %d,
rangeStart: %d, numBlocks: %d",
group,
rangeStart, numBlocks);
RETURN_ERROR(B_IO_ERROR);
}
status_t
AllocationGroup::Allocate(Transaction *transaction, uint16 start, int32
length)
{
if (start > fNumBits)
{
printk("blockallocator.cpp: start too big! %d %d %d",
start, length, fNumBits);
return B_ERROR; // This is where it fails
}
..
..
..
}
Future tries to create a directory/node inside /boot/programs will fail,
but you can create nodes in other directories without any problem.
I used following configuration:
- Harddisk, One primary partition: (2055 MB)
- Filesystem was initialized before installation started
14: disk_super_block:
14: magic1 = 0x534b5931 (SKY1) valid
14: fs_byte_order = 0x42494745 (BIGE)
14: block_size = 2048
14: block_shift = 11
14: num_blocks = 1052163
14: used_blocks = 2441
14: inode_size = 2048
14: magic2 = 0x33551214 (3U..) valid
14: blocks_per_ag = 2
14: ag_shift = 15 (8972809451634688 bytes)
14: num_ags = 33
14: flags = 0x434c454e (CLEN)
14: log_blocks = (837518622720, 2048, 27)
14: log_start = 195
14: log_end = 195
14: magic3 = 0x12149977 (...w) valid
14: bootloadersize = 128
14: root_dir = (8, 1, 48)
14: indices = (9633611644928, 1, 48)
Debug messages from the failing function:
125: blockallocator.cpp: start too big! 3591 1 3587
125: blockallocator.c: Failed to allocate block
125: group: 32, rangeStart: 3591, numBlocks: 1
125: skyfs: (sub/skyfs/BlockAllocator.cpp) AllocateBlocks:593: _status
125: bfs: (sub/skyfs/inode.cpp) New:70:
125: subfs returned error while creating directory factory.pkg
Looks like this happens when it tries to allocate blocks in the last
allocation group
Filesystem usage when it failed the first time: ~20%
Unfortunately I had no time to debug this any further yet, just wanted
to let you know that this function may cause problems.
Sincerely,
Robert!
Other related posts:
- » [openbeos] Possible BFS Problem