mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
locking: introduce prioritized_section
Introduce prioritized_section() as a closer match to previous logic of critical_section() that has been held over longer sequence of ioctl commands - essentially it's matching operation on a single cookie. While 'critical_section()' now corresponds to locked memory - we hold this memory only between suspend/resume thus notion of 'cookie' was lost. This patch restores some logic unintentionaly lost with dropping memory locking for just activation/deactivation calls.
This commit is contained in:
parent
043f58452a
commit
6365f011b0
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.178 -
|
Version 2.02.178 -
|
||||||
=====================================
|
=====================================
|
||||||
|
Add prioritized_section() to restore cookie boundaries (2.02.177).
|
||||||
Enhance error messages when read error happens.
|
Enhance error messages when read error happens.
|
||||||
Enhance mirror log initialization for old mirror target.
|
Enhance mirror log initialization for old mirror target.
|
||||||
Skip private crypto and stratis devices.
|
Skip private crypto and stratis devices.
|
||||||
|
@ -634,6 +634,11 @@ int critical_section(void)
|
|||||||
return _critical_section;
|
return _critical_section;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int prioritized_section(void)
|
||||||
|
{
|
||||||
|
return _priority_raised;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The memlock_*_daemon functions will force the mlockall() call that we need
|
* The memlock_*_daemon functions will force the mlockall() call that we need
|
||||||
* to stay in memory, but they will have no effect on device scans (unlike
|
* to stay in memory, but they will have no effect on device scans (unlike
|
||||||
|
@ -34,6 +34,7 @@ struct cmd_context;
|
|||||||
void critical_section_inc(struct cmd_context *cmd, const char *reason);
|
void critical_section_inc(struct cmd_context *cmd, const char *reason);
|
||||||
void critical_section_dec(struct cmd_context *cmd, const char *reason);
|
void critical_section_dec(struct cmd_context *cmd, const char *reason);
|
||||||
int critical_section(void);
|
int critical_section(void);
|
||||||
|
int prioritized_section(void);
|
||||||
void memlock_inc_daemon(struct cmd_context *cmd);
|
void memlock_inc_daemon(struct cmd_context *cmd);
|
||||||
void memlock_dec_daemon(struct cmd_context *cmd);
|
void memlock_dec_daemon(struct cmd_context *cmd);
|
||||||
int memlock_count_daemon(void);
|
int memlock_count_daemon(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user