HomeFreeBSD

Return default value on numeric properties failing the "head check.

Description

Return default value on numeric properties failing the "head check.

Updates 962d52421236fc9cd61d59b4f18cff3276077da9.

The referenced fix to get_numeric_property() caused numeric property
lookups to consider the type of the parent (head) dataset when checking
validity but there are some cases in the caller expects to see the
property's default value even when the lookup is invalid.

One case in which this is true is change_one() which is part of the
renaming infrastructure. It may look up "zoned" on a snapshot of a volume
which is not valid but it expects to see the default value of false.

There may be other, yet unidentified cases in which zfs_prop_get_int()
is used on technically invalid properties but which expect the property's
default value to be returned.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Turbo Fredriksson <turbo@bayour.com>
Closes #2320

Details

Provenance
Tim Chase <tim@chase2k.com>Authored on Jun 13 2014, 12:45 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 1 2014, 9:14 PM
Parents
rGee4712284cd6: Illumos #4936 fix potential overflow in lz4
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG09c0b8fe5e95: Return default value on numeric properties failing the "head check. (authored by Tim Chase <tim@chase2k.com>).Jul 1 2014, 9:14 PM