public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/
Date: Tue, 26 Nov 2019 20:32:34 +0000 (UTC)	[thread overview]
Message-ID: <1574800239.8c0c0208fdee299ea64250ea933c2a108a587f98.gyakovlev@gentoo> (raw)

commit:     8c0c0208fdee299ea64250ea933c2a108a587f98
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 26 19:54:20 2019 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Nov 26 20:30:39 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c0c0208

sys-fs/zfs: revbump 0.8.2, include updated udev timeout patch

Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 .../files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch | 61 +++++++++++++++-------
 .../{zfs-0.8.2-r1.ebuild => zfs-0.8.2-r2.ebuild}   |  0
 2 files changed, 43 insertions(+), 18 deletions(-)

diff --git a/sys-fs/zfs/files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch b/sys-fs/zfs/files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch
index 6c4054ddb66..be88f7bfee8 100644
--- a/sys-fs/zfs/files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch
+++ b/sys-fs/zfs/files/0.8.2-ZPOOL_IMPORT_UDEV_TIMEOUT_MS.patch
@@ -1,6 +1,6 @@
-From d7037d2a2fd57504070eba14634b8a7ea159de32 Mon Sep 17 00:00:00 2001
+From 803884217f9b9b5fb235d7c5e78a809d271f6387 Mon Sep 17 00:00:00 2001
 From: Richard Yao <ryao@gentoo.org>
-Date: Thu, 1 Aug 2019 15:54:30 -0400
+Date: Wed, 9 Oct 2019 12:16:12 -0700
 Subject: [PATCH] Implement ZPOOL_IMPORT_UDEV_TIMEOUT_MS
 
 Since 0.7.0, zpool import would unconditionally block on udev for 30
@@ -15,38 +15,45 @@ have their own mechanisms for blocking until device nodes are ready
 zpool import to block on a non-existent udev until a timeout is reached
 inside of them.
 
-Rather than trying to intelligently determine whether udev is avaliable
+Rather than trying to intelligently determine whether udev is available
 on the system to avoid unnecessarily blocking in such environments, it
 seems best to just allow the environment to override the timeout.  I
 propose that we add an environment variable called
 ZPOOL_IMPORT_UDEV_TIMEOUT_MS. Setting it to 0 would restore the 0.6.x
-behavior that was more desireable in mdev based initramfs environments.
-This allows the system userland utilities to be reused when building
+behavior that was more desirable in mdev based initramfs environments.
+This allows the system user land utilities to be reused when building
 mdev-based initramfs archives.
 
+Reviewed-by: Igor Kozhukhov <igor@dilos.org>
+Reviewed-by: Jorgen Lundman <lundman@lundman.net>
+Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
 Reviewed-by: Georgy Yakovlev <gyakovlev@gentoo.org>
 Signed-off-by: Richard Yao <ryao@gentoo.org>
+Closes #9436
 ---
- lib/libzutil/zutil_import.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
+ lib/libzutil/os/linux/zutil_import_os.c | 11 ++++++++++-
+ man/man8/zpool.8                        |  6 ++++++
+ 2 files changed, 16 insertions(+), 1 deletion(-)
 
-diff --git a/lib/libzutil/zutil_import.c b/lib/libzutil/zutil_import.c
-index e82744383dc..8c4d8c5cb5c 100644
---- a/lib/libzutil/zutil_import.c
-+++ b/lib/libzutil/zutil_import.c
-@@ -58,6 +58,7 @@
- #endif
+diff --git a/lib/libzutil/os/linux/zutil_import_os.c b/lib/libzutil/os/linux/zutil_import_os.c
+index 811eae397c9..e51004edc68 100644
+--- a/lib/libzutil/os/linux/zutil_import_os.c
++++ b/lib/libzutil/os/linux/zutil_import_os.c
+@@ -53,6 +53,7 @@
+ #include <libgen.h>
  #include <stddef.h>
  #include <stdlib.h>
 +#include <stdio.h>
  #include <string.h>
  #include <sys/stat.h>
  #include <unistd.h>
-@@ -1653,15 +1654,22 @@ zpool_open_func(void *arg)
+@@ -181,17 +182,25 @@ zpool_open_func(void *arg)
+ 	if (rn->rn_labelpaths) {
+ 		char *path = NULL;
  		char *devid = NULL;
++		char *env = NULL;
  		rdsk_node_t *slice;
  		avl_index_t where;
-+		char *env;
 +		int timeout;
  		int error;
  
@@ -54,9 +61,10 @@ index e82744383dc..8c4d8c5cb5c 100644
  			return;
  
 +		env = getenv("ZPOOL_IMPORT_UDEV_TIMEOUT_MS");
-+
-+		if ((env == NULL) || sscanf(env, "%d", &timeout) != 1)
++		if ((env == NULL) || sscanf(env, "%d", &timeout) != 1 ||
++		    timeout < 0) {
 +			timeout = DISK_LABEL_WAIT;
++		}
 +
  		/*
  		 * Allow devlinks to stabilize so all paths are available.
@@ -65,4 +73,21 @@ index e82744383dc..8c4d8c5cb5c 100644
 +		zpool_label_disk_wait(rn->rn_name, timeout);
  
  		if (path != NULL) {
- 			slice = zfs_alloc(hdl, sizeof (rdsk_node_t));
+ 			slice = zutil_alloc(hdl, sizeof (rdsk_node_t));
+diff --git a/man/man8/zpool.8 b/man/man8/zpool.8
+index 467d2411d40..df30b7ca05c 100644
+--- a/man/man8/zpool.8
++++ b/man/man8/zpool.8
+@@ -2813,6 +2813,12 @@ Similar to the
+ option in
+ .Nm zpool import .
+ .El
++.Bl -tag -width "ZPOOL_IMPORT_UDEV_TIMEOUT_MS"
++.It Ev ZPOOL_IMPORT_UDEV_TIMEOUT_MS
++The maximum time in milliseconds that
++.Nm zpool import
++will wait for an expected device to be available.
++.El
+ .Bl -tag -width "ZPOOL_VDEV_NAME_GUID"
+ .It Ev ZPOOL_VDEV_NAME_GUID
+ Cause

diff --git a/sys-fs/zfs/zfs-0.8.2-r1.ebuild b/sys-fs/zfs/zfs-0.8.2-r2.ebuild
similarity index 100%
rename from sys-fs/zfs/zfs-0.8.2-r1.ebuild
rename to sys-fs/zfs/zfs-0.8.2-r2.ebuild


             reply	other threads:[~2019-11-26 20:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26 20:32 Georgy Yakovlev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-02-23  6:33 [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/ Sam James
2023-12-16 10:06 Sam James
2023-07-03 21:03 Sam James
2022-12-25  0:24 Georgy Yakovlev
2022-12-08 19:48 Georgy Yakovlev
2022-10-04  5:07 Sam James
2022-09-17 22:16 Georgy Yakovlev
2022-09-16 23:09 Georgy Yakovlev
2022-07-01  7:34 Sam James
2022-06-07 18:56 Georgy Yakovlev
2021-12-26 22:35 Georgy Yakovlev
2021-12-23 22:28 Georgy Yakovlev
2021-12-16  2:51 Georgy Yakovlev
2021-11-07 23:59 Georgy Yakovlev
2021-06-04  2:14 Georgy Yakovlev
2020-11-03 20:07 Georgy Yakovlev
2020-09-25 20:28 Georgy Yakovlev
2020-05-26 23:58 Georgy Yakovlev
2019-09-27 19:16 Georgy Yakovlev
2019-03-31  3:53 Georgy Yakovlev
2018-02-14 20:39 Matt Thode

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=1574800239.8c0c0208fdee299ea64250ea933c2a108a587f98.gyakovlev@gentoo \
    --to=gyakovlev@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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