Without this change with TRIM enabled first free for block residing on removed vdev causes either assertion "zio->io_type == ZIO_TYPE_WRITE (0x3 == 0x2)" as in bug report 229007 if built with debug, or NULL dereference as in 228750 otherwise. Both cases are caused by the fact that vdev_indirect_io_start() has no idea about ZIO_TYPE_FREE, and also about the fact that such ZIOs have no data buffer.
This patch does two things:
- removes assertion that there are only ZIO_TYPE_READ and ZIO_TYPE_WRITE are possible;
- adds handling for NULL data pointers in case of ZIO_TYPE_FREE.