Skip floppy device when probing /dev/

When probing /dev/ for validing ZFS devices to import skip floppy
block devices.  There's no reason to waste time checking these
devices even though they are valid block devices.  Plus, we had
one system get stuck on I/O errors probing the device.

  end_request: I/O error, dev fd0, sector 0
  Buffer I/O error on device fd0p120, logical block 0
  end_request: I/O error, dev fd0, sector 8
  Buffer I/O error on device fd0p120, logical block 1
This commit is contained in:
Brian Behlendorf 2010-08-12 14:36:49 -07:00
parent a3a4874ef1
commit 260f8400e8
1 changed files with 3 additions and 1 deletions

View File

@ -1078,6 +1078,7 @@ zpool_find_import_impl(libzfs_handle_t *hdl, importargs_t *iarg)
* vcs* - Virtual console memory.
* parport* - Parallel port interface.
* lp* - Printer interface.
* fd* - Floppy interface.
*/
if ((strncmp(name, "watchdog", 8) == 0) ||
(strncmp(name, "fuse", 4) == 0) ||
@ -1085,7 +1086,8 @@ zpool_find_import_impl(libzfs_handle_t *hdl, importargs_t *iarg)
(strncmp(name, "tty", 3) == 0) ||
(strncmp(name, "vcs", 3) == 0) ||
(strncmp(name, "parport", 7) == 0) ||
(strncmp(name, "lp", 2) == 0))
(strncmp(name, "lp", 2) == 0) ||
(strncmp(name, "fd", 2) == 0))
continue;
if ((fd = openat64(dfd, name, O_RDONLY)) < 0)