Linux Device Mapper development
 help / color / mirror / Atom feed
From: Benjamin Marzinski <bmarzins@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Christophe Varoqui <christophe.varoqui@gmail.com>
Subject: [PATCH V3 09/18] multipath: fix set_oom_adj
Date: Sat, 12 Jan 2013 00:04:46 -0600	[thread overview]
Message-ID: <1357970695-3396-9-git-send-email-bmarzins@redhat.com> (raw)
In-Reply-To: <1357970695-3396-1-git-send-email-bmarzins@redhat.com>

Fix set_oom_adj() to work correclty if OOM_ADJUST_MIN isn't
defined.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 multipathd/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/multipathd/main.c b/multipathd/main.c
index 8917499..a6afebb 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1542,8 +1542,12 @@ set_oom_adj (void)
 				strerror(errno));
 			return;
 		}
+#ifdef OOM_ADJUST_MIN
 		file = "/proc/self/oom_adj";
 		score = OOM_ADJUST_MIN;
+#else
+		retry = 0;
+#endif
 	} while (retry--);
 	condlog(0, "couldn't adjust oom score");
 }
-- 
1.8.0

  parent reply	other threads:[~2013-01-12  6:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12  6:04 [PATCH V3 01/18] multipath: default fast_io_fail to 5 seconds Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 02/18] multipath: remove default options from built-in Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 03/18] multipath: change default path_selector to Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 04/18] multipath: make devt2devname use lstat to check Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 05/18] multipath: add support for Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 06/18] multipath: remove duplicates from multipath Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 07/18] multipath: add detect_prio option to autodetect Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 08/18] multipath: update netapp config Benjamin Marzinski
2013-01-12  6:04 ` Benjamin Marzinski [this message]
2013-01-12  6:04 ` [PATCH V3 10/18] multipath: rely on udev device creation for kpartx Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 11/18] multipath: update documentation Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 12/18] multipath: make multipathd work with new dm/lvm Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 13/18] multipath: make reservation_key print out correctly Benjamin Marzinski
2013-01-21  5:50   ` Chauhan, Vijay
2013-01-12  6:04 ` [PATCH V3 14/18] multipath: storagetek 6180 config Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 15/18] multipath: Fix kpartx and udevd race Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 16/18] multipath: Check blacklists as soon as possible Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 17/18] multipath: check for NULL from udev_device_get_* Benjamin Marzinski
2013-01-12  6:04 ` [PATCH V3 18/18] multipath: make path devices readonly again Benjamin Marzinski
2013-01-12 13:16 ` [PATCH V3 01/18] multipath: default fast_io_fail to 5 seconds Christophe Varoqui
2013-01-14  7:03   ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357970695-3396-9-git-send-email-bmarzins@redhat.com \
    --to=bmarzins@redhat.com \
    --cc=christophe.varoqui@gmail.com \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox