Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Nov 2019 18:07:30 +0000 (UTC)
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r354363 - head/stand/libsa/zfs
Message-ID:  <201911051807.xA5I7Ur7003484@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tsoome
Date: Tue Nov  5 18:07:30 2019
New Revision: 354363
URL: https://svnweb.freebsd.org/changeset/base/354363

Log:
  loader: populate nvl with data even when label_txg is 0
  
  We actually do not use that data, at least not now, but we want to
  avoid possible surprises.

Modified:
  head/stand/libsa/zfs/zfsimpl.c

Modified: head/stand/libsa/zfs/zfsimpl.c
==============================================================================
--- head/stand/libsa/zfs/zfsimpl.c	Tue Nov  5 17:49:15 2019	(r354362)
+++ head/stand/libsa/zfs/zfsimpl.c	Tue Nov  5 18:07:30 2019	(r354363)
@@ -1641,8 +1641,10 @@ vdev_label_read_config(vdev_t *vd, uint64_t txg)
 		nvlist = (const unsigned char *) label->vp_nvlist + 4;
 		error = nvlist_find(nvlist, ZPOOL_CONFIG_POOL_TXG,
 		    DATA_TYPE_UINT64, NULL, &label_txg);
-		if (error != 0 || label_txg == 0)
+		if (error != 0 || label_txg == 0) {
+			memcpy(nvl, nvlist, nvl_size);
 			return (nvl);
+		}
 
 		if (label_txg <= txg && label_txg > best_txg) {
 			best_txg = label_txg;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911051807.xA5I7Ur7003484>