spa_config_update not calling spa_config_sync for root pools

Steven Hartland steven at multiplay.co.uk
Thu Nov 6 22:22:19 UTC 2014


I've been looking at an issue a user reported where they believed the 
config of a log device added to their root pool had an incorrect ashift, 
which turned out to be incorrect data in zpool.cache.

I've tracked this down to the fact that spa_config_update doesn't call 
spa_config_sync if the pool is the root pool:
https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/fs/zfs/spa_config.c#L539

This check was added by the old commit:
https://github.com/illumos/illumos-gate/commit/e7cbe64f7a72dae5cb44f100db60ca88f3313c65

Back then spa_config_sync didn't take any args, so I'm wondering we can 
now remove the if (!spa->spa_is_root) restriction to ensure that stale 
information in the zpool.cache is correctly updated when operating on 
the root pool?

     Regards
     Steve


More information about the zfs-devel mailing list