Fix code to make mdmon leave the udev cgroup correctly
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
This commit is contained in:
parent
4335bd6f0f
commit
d047b34df2
@ -1,8 +1,8 @@
|
|||||||
diff -up mdadm-3.2.6/util.c.cgroup mdadm-3.2.6/util.c
|
diff -up mdadm-3.2.6/util.c.cgroup mdadm-3.2.6/util.c
|
||||||
--- mdadm-3.2.6/util.c.cgroup 2012-11-15 16:48:03.327035349 -0500
|
--- mdadm-3.2.6/mdmon.c.cgroup 2012-11-15 16:48:03.327035349 -0500
|
||||||
+++ mdadm-3.2.6/util.c 2012-11-15 17:07:16.628751041 -0500
|
+++ mdadm-3.2.6/mdmon.c 2012-11-15 17:07:16.628751041 -0500
|
||||||
@@ -1611,6 +1611,25 @@ int mdmon_running(int devnum)
|
@@ -386,6 +386,25 @@
|
||||||
return 0;
|
return mdmon(devname, devnum, do_fork(), takeover);
|
||||||
}
|
}
|
||||||
|
|
||||||
+int set_cgroup(char *group)
|
+int set_cgroup(char *group)
|
||||||
@ -24,14 +24,15 @@ diff -up mdadm-3.2.6/util.c.cgroup mdadm-3.2.6/util.c
|
|||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
int start_mdmon(int devnum)
|
static int mdmon(char *devname, int devnum, int must_fork, int takeover)
|
||||||
{
|
{
|
||||||
int i, skipped;
|
int mdfd;
|
||||||
@@ -1653,6 +1668,7 @@ int start_mdmon(int devnum)
|
@@ -438,6 +457,8 @@
|
||||||
|
} else
|
||||||
|
pfd[0] = pfd[1] = -1;
|
||||||
|
|
||||||
for (i=0; paths[i]; i++)
|
+ set_cgroup("systemd");
|
||||||
if (paths[i][0]) {
|
+
|
||||||
+ set_cgroup("systemd");
|
container = calloc(1, sizeof(*container));
|
||||||
if (__offroot) {
|
container->devnum = devnum;
|
||||||
execl(paths[i], "mdmon", "--offroot",
|
container->devname = devname;
|
||||||
devnum2devname(devnum),
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: The mdadm program controls Linux md devices (software RAID arrays)
|
Summary: The mdadm program controls Linux md devices (software RAID arrays)
|
||||||
Name: mdadm
|
Name: mdadm
|
||||||
Version: 3.2.6
|
Version: 3.2.6
|
||||||
Release: 10%{?dist}
|
Release: 11%{?dist}
|
||||||
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz
|
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz
|
||||||
Source1: mdmonitor.init
|
Source1: mdmonitor.init
|
||||||
Source2: raid-check
|
Source2: raid-check
|
||||||
@ -159,6 +159,10 @@ rm -rf %{buildroot}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 8 2013 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.2.6-11
|
||||||
|
- Move code to leave udev cgroup into mdmon and excute it after we
|
||||||
|
work, to make sure it actually does the right thing.
|
||||||
|
|
||||||
* Mon Jan 7 2013 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.2.6-10
|
* Mon Jan 7 2013 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.2.6-10
|
||||||
- Fix mdmonitor-takeover.service dangling symlink problem for real
|
- Fix mdmonitor-takeover.service dangling symlink problem for real
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user