mirror of
https://github.com/opnsense/src.git
synced 2026-06-14 19:20:18 -04:00
MFC r205200 + r206199
Merge OpenSolaris revision 9396:f41cf682d0d3: 6830813 zfs list -t all fails assertion *Note that this is only a partial merge of this revision addressing only this one issue.* PR: bin/144720 Submitted by: mm
This commit is contained in:
parent
8dcde976b2
commit
305cb06fe3
2 changed files with 13 additions and 2 deletions
|
|
@ -368,7 +368,10 @@ zfs_for_each(int argc, char **argv, int flags, zfs_type_t types,
|
|||
* properties other than those listed in cb_proplist/sortcol are
|
||||
* accessed.
|
||||
*
|
||||
* If cb_proplist is NULL then we retain all the properties.
|
||||
* If cb_proplist is NULL then we retain all the properties. We
|
||||
* always retain the zoned property, which some other properties
|
||||
* need (userquota & friends), and the createtxg property, which
|
||||
* we need to sort snapshots.
|
||||
*/
|
||||
if (cb.cb_proplist && *cb.cb_proplist) {
|
||||
zprop_list_t *p = *cb.cb_proplist;
|
||||
|
|
@ -388,6 +391,9 @@ zfs_for_each(int argc, char **argv, int flags, zfs_type_t types,
|
|||
}
|
||||
sortcol = sortcol->sc_next;
|
||||
}
|
||||
|
||||
cb.cb_props_table[ZFS_PROP_ZONED] = B_TRUE;
|
||||
cb.cb_props_table[ZFS_PROP_CREATETXG] = B_TRUE;
|
||||
} else {
|
||||
(void) memset(cb.cb_props_table, B_TRUE,
|
||||
sizeof (cb.cb_props_table));
|
||||
|
|
|
|||
|
|
@ -4285,7 +4285,12 @@ zfs_prune_proplist(zfs_handle_t *zhp, uint8_t *props)
|
|||
zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr));
|
||||
nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr);
|
||||
|
||||
if (props[zfs_prop] == B_FALSE)
|
||||
/*
|
||||
* We leave user:props in the nvlist, so there will be
|
||||
* some ZPROP_INVAL. To be extra safe, don't prune
|
||||
* those.
|
||||
*/
|
||||
if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE)
|
||||
(void) nvlist_remove(zhp->zfs_props,
|
||||
nvpair_name(curr), nvpair_type(curr));
|
||||
curr = next;
|
||||
|
|
|
|||
Loading…
Reference in a new issue