bfs_read_vnode() no longer tries to load a block when there can't be an inode
(since it knows that it doesn't place any inodes before the end of the log area). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14068 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e432cef296
commit
15612acb76
|
@ -257,8 +257,11 @@ bfs_read_vnode(void *_ns, vnode_id id, void **_node, bool reenter)
|
|||
//FUNCTION_START(("vnode_id = %Ld\n", id));
|
||||
Volume *volume = (Volume *)_ns;
|
||||
|
||||
if (id < 0 || id > volume->NumBlocks()) {
|
||||
FATAL(("inode at %Ld requested!\n", id));
|
||||
// first inode may be after the log area, we don't go through
|
||||
// the hassle and try to load an earlier block from disk
|
||||
if (id < volume->ToBlock(volume->Log()) + volume->Log().Length()
|
||||
|| id > volume->NumBlocks()) {
|
||||
INFORM(("inode at %Ld requested!\n", id));
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue