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

Preload libc locale messages.

Preload libc.mo file for localized lvm before taking memory lock - this way
we prevent disk access for some error paths in libdm, that prints localized
errno messages while they are still in memory locked state.
This commit is contained in:
Zdenek Kabelac 2010-06-24 08:29:30 +00:00
parent 2e08761496
commit d301e5917f
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.69 -
================================
Preload libc locale messages to prevent reading it in memory locked state.
Fix handling of simultaneous mirror image and mirrored log image failure.
Version 2.02.68 - 23rd June 2010

View File

@ -216,6 +216,9 @@ static int _memlock_maps(struct cmd_context *cmd, lvmlock_t lock, size_t *mstats
#endif
}
/* Force libc.mo load */
if (lock == LVM_MLOCK)
(void)strerror(0);
/* Reset statistic counters */
*mstats = 0;
rewind(_mapsh);