Make 'unmount -a[f]' calls less evil by introducing __ZFS_POOL_EXCLUDE 
environment variable (in addition to __ZFS_POOL_RESTRICT one) which tells 
zpool_iter() and zfs_iter_root() to skip listed pools. The function was renamed 
to zpool_skip_pool() and made global. Modified check is also used in 
unshare_unmount() in zfs_main.c.

zfstest.ksh modified to set __ZFS_POOL_EXCLUDE to KEEP contents (or just root 
pool if KEEP isn't set). Fix the KEEP->regex conversion while here.

This was already reviewed and submitted for RTI, but as it has stalled, let's 
try (and test) this here.
You can view, comment on, or merge this pull request online at:

  https://github.com/openzfs/openzfs/pull/58

-- Commit Summary --

  * 4521 zfstest is trying to execute evil "zfs unmount -a"

-- File Changes --

    M usr/src/cmd/zfs/zfs_main.c (11)
    M usr/src/lib/libzfs/common/libzfs.h (4)
    M usr/src/lib/libzfs/common/libzfs_config.c (35)
    M usr/src/lib/libzfs/common/libzfs_dataset.c (11)
    M usr/src/lib/libzfs/common/mapfile-vers (4)
    M usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh (12)

-- Patch Links --

https://github.com/openzfs/openzfs/pull/58.patch
https://github.com/openzfs/openzfs/pull/58.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/58
_______________________________________________
developer mailing list
[email protected]
http://lists.open-zfs.org/mailman/listinfo/developer

Reply via email to