Make sure that POOL_IMPORTED is set, unset and checked where appropriate.
- If it's unset in find_rootfs(), no pool is imported so no point in looking for a rootfs.
- If find_rootfs() couldn't find a rootfs, the pool is exported. Remember to unset POOL_IMPORTED after doing so.
- Set POOL_IMPORTED if/when a pool have been imported in import_pool().
- Improve backup import (the one using cache file).
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3636