1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

memlock: report memlock daemon counter

Add internal memlock_count_daemon().

Function can be used to recognize it's being executed
from daemon restricted execution inside /lib code.
This commit is contained in:
Zdenek Kabelac 2015-10-22 10:43:58 +02:00
parent 19e272ba53
commit 7b78d496bf
3 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.133 -
======================================
Support checking of memlock daemon counter.
Allow all log levels to be used with the lvmetad -l option.
Add optional shutdown when idle support for lvmetad.
Fix missing in-sync progress info while lvconvert used with lvmpolld.

View File

@ -638,3 +638,8 @@ void memlock_unlock(struct cmd_context *cmd)
}
#endif
int memlock_count_daemon()
{
return _memlock_count_daemon;
}

View File

@ -36,6 +36,7 @@ void critical_section_dec(struct cmd_context *cmd, const char *reason);
int critical_section(void);
void memlock_inc_daemon(struct cmd_context *cmd);
void memlock_dec_daemon(struct cmd_context *cmd);
int memlock_count_daemon(void);
void memlock_init(struct cmd_context *cmd);
void memlock_reset(void);
void memlock_unlock(struct cmd_context *cmd);