]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Update cache file when setting compatibility property
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 24 Jun 2021 21:30:02 +0000 (14:30 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 24 Jun 2021 21:33:51 +0000 (14:33 -0700)
commitaee26af277c91abeb0e1cfe27cc48cc328fdb881
tree66bb0f3c5feb0e6d4d35b8d1df63be2953e6867f
parent620389d32f6bd5676fd0797f2e3314793db6f1e2
Update cache file when setting compatibility property

Unlike most other properties the 'compatibility' property is stored
in the pool config object and not the DMU_OT_POOL_PROPS object.

This had the advantage that the compatibility information is available
without needing to fully import the pool (it can be read with zdb).
However, this means we need to make sure to update both the copy of
the config in the MOS and the cache file.  This wasn't being done.

This commit adds a call to spa_async_request() to ensure the copy of
the config in the cache file gets updated as well as the one stored
in the pool.  This same change is made for the 'comment' property
which suffers from the same inconsistency.

Reviewed-by: Sean Eric Fagan <sef@ixsystems.com>
Reviewed-by: Colm Buckley <colm@tuatha.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12261
Closes #12276
module/zfs/spa.c
tests/runfiles/common.run
tests/zfs-tests/tests/functional/cli_root/zpool_create/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_009_pos.ksh [new file with mode: 0755]