From: NeilBrown <neilb-l3A5Bk7waGM@public.gmane.org>
To: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 2/4] systemd/dracut-iniqueue - continue waiting if any timeout script makes progress
Date: Thu, 26 Mar 2015 15:41:47 +1100 [thread overview]
Message-ID: <20150326044146.10121.82753.stgit@notabene.brown> (raw)
In-Reply-To: <20150326043938.10121.34223.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
A number of timeout scripts can be registered. If any one of them
makes progress - e.g. assembles a degraded md array - then
the main loop should wait a bit longer rather than pressing forward.
This is particularly important is resume-from-hibernate requires a
degraded md array. Both the script to forcibly assemble the md array
and the script to abort hibernation if the device doesn't appear
are 'timeout' scripts. There needs to be a reasonable delay between
these running.
So: if any script has indicated that progress was made, break of out
the loop and go back to normal waiting.
Signed-off-by: NeilBrown <neilb-l3A5Bk7waGM@public.gmane.org>
---
modules.d/98dracut-systemd/dracut-initqueue.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/98dracut-systemd/dracut-initqueue.sh b/modules.d/98dracut-systemd/dracut-initqueue.sh
index 88cd1e056ed7..af9cec2c5b8c 100755
--- a/modules.d/98dracut-systemd/dracut-initqueue.sh
+++ b/modules.d/98dracut-systemd/dracut-initqueue.sh
@@ -60,6 +60,7 @@ while :; do
job=$job . $job
udevadm settle --timeout=0 >/dev/null 2>&1 || main_loop=0
[ -f $hookdir/initqueue/work ] && main_loop=0
+ [ $main_loop -eq 0 ] && break
done
fi
next prev parent reply other threads:[~2015-03-26 4:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-26 4:41 [PATCH 0/4] dracut: fix various issues with newly degraded md arrays NeilBrown
[not found] ` <20150326043938.10121.34223.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2015-03-26 4:41 ` [PATCH 1/4] mdraid/mdraid_start.sh: tell mainloop if we make progress NeilBrown
2015-03-26 4:41 ` NeilBrown [this message]
2015-03-26 4:41 ` [PATCH 3/4] dracut-systemd/rootfs-generator.sh: always create generated files NeilBrown
2015-03-26 4:41 ` [PATCH 4/4] crypt/parse-crypt.sh: hide encrypted devices from systemd timeout warnings NeilBrown
[not found] ` <20150326044148.10121.15286.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2015-03-26 11:51 ` Harald Hoyer
2015-03-26 15:38 ` [Dracut GitHub] Patchset imported to github Dracut GitHub Import Bot
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=20150326044146.10121.82753.stgit@notabene.brown \
--to=neilb-l3a5bk7wagm@public.gmane.org \
--cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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