Displaying 7 results from an estimated 7 matches for "max_root_wait".
2017 Apr 19
6
[PATCH supermin 0/3] Require root= parameter, refactor init.
Require the root= parameter is passed to specify which
root (apppliance) to mount. Libguestfs has done this since 2012.
The other two patches are small code refactorings in the init
program.
Rich.
2017 Apr 19
1
[PATCH supermin] init: Support root=UUID=... to specify the appliance disk by volume UUID.
...(root, "/dev/", 5) == 0)
- root += 5;
- if (strncmp (root, "pmem", 4) == 0)
- dax = 1;
- len = strcspn (root, " ");
- root[len] = '\0';
-
- asprintf (&path, "/sys/block/%s/dev", root);
- for (delay_ns = 250000;
- delay_ns <= MAX_ROOT_WAIT * UINT64_C(1000000000);
- delay_ns *= 2) {
- fp = fopen (path, "r");
- if (fp != NULL)
- break;
+ if (strncmp (root, "/dev/", 5) == 0) {
+ char *path;
- if (delay_ns > 1000000000) {
- fprintf (stderr,
- "supermin: waiting anot...
2017 Apr 25
1
[PATCH supermin v2] init: Support root=UUID=... to specify the appliance disk by volume UUID.
v1 -> v2:
- I fixed the end condition of the loop in parse_root_uuid.
- Retested.
Didn't change the busy wait loop into a function or macro,
as per discussion on IRC.
Rich.
2017 Apr 19
0
[PATCH supermin 3/3] init: Refactor for-loop which waits for root device to show up.
...0000; \
+ nanosleep (&t, NULL); \
+ } while(0)
+
mount_proc ();
fprintf (stderr, "supermin: ext2 mini initrd starting up: "
@@ -184,7 +190,9 @@ main ()
asprintf (&path, "/sys/block/%s/dev", root);
- while (delay_ns <= MAX_ROOT_WAIT * UINT64_C(1000000000)) {
+ for (delay_ns = 250000;
+ delay_ns <= MAX_ROOT_WAIT * UINT64_C(1000000000);
+ delay_ns *= 2) {
fp = fopen (path, "r");
if (fp != NULL)
break;
@@ -201,10 +209,7 @@ main ()
}
}
- t.tv_sec = delay_ns / 1000000000;...
2017 Apr 19
0
[PATCH supermin 2/3] init: Move variable declarations to the top of the function.
...;root=");
if (!root) {
fprintf (stderr, "supermin: missing root= parameter on the command line\n");
@@ -175,8 +184,6 @@ main ()
asprintf (&path, "/sys/block/%s/dev", root);
- uint64_t delay_ns = 250000;
- int virtio_message = 0;
while (delay_ns <= MAX_ROOT_WAIT * UINT64_C(1000000000)) {
fp = fopen (path, "r");
if (fp != NULL)
@@ -194,7 +201,6 @@ main ()
}
}
- struct timespec t;
t.tv_sec = delay_ns / 1000000000;
t.tv_nsec = delay_ns % 1000000000;
nanosleep (&t, NULL);
@@ -205,9 +211,9 @@ main ()...
2016 Feb 17
8
[PATCH supermin 0/2] Allow an alternate libc to be used for init.
v1 -> v2:
- If we split out the init program into a separate init/ directory,
that makes it much easier to build against an alternate libc.
I tried to build against uClibc, but uClibc requires an entire build
chain, which looked like it was going to be a massive ballache.
Rich.
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...On slow machines with lots of disks (Koji running the 255 disk test
- * in libguestfs) this really can take several minutes.
- *
- * Note that the actual wait time is approximately double the number
- * given here because there is a delay which doubles until it reaches
- * this value.
- */
-#define MAX_ROOT_WAIT 300
-
-extern long init_module (void *, unsigned long, const char *);
-
-/* translation taken from module-init-tools/insmod.c */
-static const char *moderror(int err)
-{
- switch (err) {
- case ENOEXEC:
- return "Invalid module format";
- case ENOENT:
- return "Unknown symb...