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.
This commit is contained in:
parent
b0460c4c22
commit
9a3ea7594b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354363
@ -1641,8 +1641,10 @@ vdev_label_read_config(vdev_t *vd, uint64_t txg)
|
|||||||
nvlist = (const unsigned char *) label->vp_nvlist + 4;
|
nvlist = (const unsigned char *) label->vp_nvlist + 4;
|
||||||
error = nvlist_find(nvlist, ZPOOL_CONFIG_POOL_TXG,
|
error = nvlist_find(nvlist, ZPOOL_CONFIG_POOL_TXG,
|
||||||
DATA_TYPE_UINT64, NULL, &label_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);
|
return (nvl);
|
||||||
|
}
|
||||||
|
|
||||||
if (label_txg <= txg && label_txg > best_txg) {
|
if (label_txg <= txg && label_txg > best_txg) {
|
||||||
best_txg = label_txg;
|
best_txg = label_txg;
|
||||||
|
Loading…
Reference in New Issue
Block a user