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:
@@ -257,8 +257,11 @@ bfs_read_vnode(void *_ns, vnode_id id, void **_node, bool reenter)
|
|||||||
//FUNCTION_START(("vnode_id = %Ld\n", id));
|
//FUNCTION_START(("vnode_id = %Ld\n", id));
|
||||||
Volume *volume = (Volume *)_ns;
|
Volume *volume = (Volume *)_ns;
|
||||||
|
|
||||||
if (id < 0 || id > volume->NumBlocks()) {
|
// first inode may be after the log area, we don't go through
|
||||||
FATAL(("inode at %Ld requested!\n", id));
|
// 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;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user