main: compute nr of locally needed resources

This commit is contained in:
Thomas Schoebel-Theuer 2023-05-10 11:27:32 +02:00
parent da68981a3a
commit 21bb01cfbd
1 changed files with 8 additions and 0 deletions

View File

@ -250,6 +250,9 @@ void _crashme(int mode, bool do_sync)
#endif
int nr_affected_resources;
int tmp_nr_affected_resources;
void invalidate_user_cache(void)
{
const char *path;
@ -6112,6 +6115,7 @@ int make_bio(struct mars_dent *dent)
if (!rot)
goto done;
tmp_nr_affected_resources++;
rot->tmp_members++;
/* for detach, both the logger and the bio must be gone */
@ -7782,6 +7786,10 @@ static int _main_thread(void *data)
peer_count,
!list_empty(&mars_global->brick_anchor));
/* swizzle indicator */
nr_affected_resources = tmp_nr_affected_resources;
tmp_nr_affected_resources = 0;
/* Static memlimit */
if (mars_mem_percent < 0)
mars_mem_percent = 0;