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
This commit is contained in:
Axel Dörfler 2003-05-26 22:40:14 +00:00
parent 3cfd8472f9
commit a476bfc5b1

View File

@ -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;
}