]> sourceware.org Git - lvm2.git/commitdiff
Preload libc locale messages.
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 24 Jun 2010 08:29:30 +0000 (08:29 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 24 Jun 2010 08:29:30 +0000 (08:29 +0000)
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.

WHATS_NEW
lib/mm/memlock.c

index 09030ae30da785462bc69fa4f9d94cb9dd0b6d15..1c659c509a6abedc8cbc488fe6a179f15de4a6ea 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -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
index 6da5b571ebedfe0785d4b8ad8a3343570c7de966..bc18c0df84591b4b261d92b525c88294dfd34f06 100644 (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);
This page took 0.0459270000000001 seconds and 5 git commands to generate.