From e5c30061fc5652846a61fcd460c6a1636d346a7c Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 15 Jul 2013 11:41:07 +0200 Subject: [PATCH] libdm: remove unneeded read_ahead settings Skip settings are read_ahead value which is already set in kernel. --- WHATS_NEW_DM | 1 + libdm/libdm-common.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 2fc454b62..e784ada2f 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.78 - =================================== + Optimize out setting the same value or read_ahead. Add DM_ARRAY_SIZE public macro. Move syslog code out of signal handle in dmeventd. Add DM_TO_STRING public macro. diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c index d18de9ce2..8d5eca884 100644 --- a/libdm/libdm-common.c +++ b/libdm/libdm-common.c @@ -1221,7 +1221,7 @@ static int _set_dev_node_read_ahead(const char *dev_name, if (!get_dev_node_read_ahead(dev_name, major, minor, ¤t_read_ahead)) return_0; - if (current_read_ahead > read_ahead) { + if (current_read_ahead >= read_ahead) { log_debug_activation("%s: retaining kernel read ahead of %" PRIu32 " (requested %" PRIu32 ")", dev_name, current_read_ahead, read_ahead);