zfsonlinux/zfs — pull request #1616 by ryao (2013-07-26 20:36:48+00:00)
Title: Illumos #3639 zpool.cache should skip over readonly pools

Normally we don't list pools that are imported read-only in the cache
file, however you can accidentally get one into the cache file by
importing and exporting a read-write pool while a read-only pool is
imported:

$ zpool import -o readonly test1
$ zpool import test2
$ zpool export test2
$ zdb -C

This is a problem because if the machine reboots we import all pools in
the cache file as read-write.

https://www.illumos.org/issues/3639

Reviewed by: Eric Schrock
Reviewed by: Adam Leventhal
Reviewed by: Basil Crow
Approved by: Gordon Ross
Ported-by: Richard Yao