mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
log: skip repeated hashing when logging once
When a message is already found in the hash, no need to hash it again.
This commit is contained in:
parent
96cf9dc017
commit
700b4bfc94
@ -268,7 +268,8 @@ void print_log(int level, const char *file, int line, int dm_errno_or_class,
|
||||
if (_duplicated) {
|
||||
if (dm_hash_lookup(_duplicated, message))
|
||||
level = _LOG_NOTICE;
|
||||
(void) dm_hash_insert(_duplicated, message, (void*)1);
|
||||
else
|
||||
(void) dm_hash_insert(_duplicated, message, (void*)1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user