From a476bfc5b146a08af87ff292aa5b954753f8cc1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 26 May 2003 22:40:14 +0000 Subject: [PATCH] Now waits for a whole second on the inode to become unbusy - just in case there is a slow drive. Note, if the system is heavily used and the thread waiting for the inode to become unbusy is a real time thread, that time might be not enough - don't have a better solution at hand though (other than waiting even longer). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3346 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp b/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp index d5a221b536..9a5cfa5c92 100644 --- a/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp @@ -369,6 +369,7 @@ bfs_read_vnode(void *_ns, vnode_id id, char reenter, void **_node) while (true) { if ((status = inode->InitCheck()) == B_OK) { + // the inode is okay and ready to be used *_node = (void *)inode; return B_OK; } @@ -376,8 +377,8 @@ bfs_read_vnode(void *_ns, vnode_id id, char reenter, void **_node) // if "status" is B_BUSY, we wait a bit and try again if (status == B_BUSY) { - // wait for half a second at maximum - if (tries++ < 100) { + // wait for one second at maximum + if (tries++ < 200) { snooze(5000); continue; }