mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
hw/9pfs: Add directory reclaim support
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
This commit is contained in:
parent
9b54ffaab2
commit
95f65511c3
2 changed files with 38 additions and 2 deletions
|
@ -97,6 +97,12 @@ int v9fs_co_opendir(V9fsState *s, V9fsFidState *fidp)
|
|||
err = 0;
|
||||
}
|
||||
});
|
||||
if (!err) {
|
||||
total_open_fd++;
|
||||
if (total_open_fd > open_fd_hw) {
|
||||
v9fs_reclaim_fd(s);
|
||||
}
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -111,5 +117,8 @@ int v9fs_co_closedir(V9fsState *s, DIR *dir)
|
|||
err = -errno;
|
||||
}
|
||||
});
|
||||
if (!err) {
|
||||
total_open_fd--;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue