Improve 'zpool import' safety
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 17 Feb 2011 17:21:39 +0000 (09:21 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 17 Feb 2011 17:35:43 +0000 (09:35 -0800)
commitf03e41e8da6d184039ea3b03ba4937f4786a3f22
tree2041b8075118e717e397e38635655822ca2fa5ad
parent8b4f9a2d55fc5ee28f69b29f2fece7d8e2cb5c7a
Improve 'zpool import' safety

There are three improvements here to 'zpool import' proposed by Fajar
in Github issue #98.  They are all good so I'm commiting all three.

1) Add descriptions for "hpet" and "core" blacklist entries.

2) Add "core" to the blacklist, as described in the issue accessing
this device will crash Xen dom0.

3) Refine probing behavior to use fstatat64().  This allows us to
determine if a device is a block device or a regular file without
having to open it.  This is the safest appraoch when probing /dev/
because the simple act of opening a device may have unexpected
consequences.

Closes #98
lib/libzfs/libzfs_import.c