zfsonlinux/zfs — pull request #716 by ryao (2012-05-02 12:39:17+00:00)
Title: Import Illumos #701: UNMAP support for COMSTAR

Reviewed by: Garrett D'Amore
Reviewed by: Eric Schrock
Reviewed by: George Wilson
Approved by: Garrett D'Amore

Refererce to Illumos issue:
https://www.illumos.org/issues/701

This enables logging of discard operations to the ZIL by merging
illumos/illumos-gate@b77b9231da168bb31490f65bf2697f6031b7f601. There is
one key difference between the Illumos code and our import of it. The
illumos code will treat discard requests as synchronous operations when
the write-cache is disabled by checking ZVOL_WCE in zv->zv_flags. That
is set by the DKIOCSETWCE ioctl on Solaris. This does not appear to
have an analog on Linux, so the Ilumos behavior is not implemented in
our code.

Ported-by: Richard Yao