1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +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 - 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. Fix handling of simultaneous mirror image and mirrored log image failure.
Version 2.02.68 - 23rd June 2010 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 #endif
} }
/* Force libc.mo load */
if (lock == LVM_MLOCK)
(void)strerror(0);
/* Reset statistic counters */ /* Reset statistic counters */
*mstats = 0; *mstats = 0;
rewind(_mapsh); rewind(_mapsh);