Log zvol truncate/discard operations
authorDan McDonald <danmcd@nexenta.com>
Sun, 2 Aug 2015 13:01:14 +0000 (08:01 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 26 Jan 2016 22:16:03 +0000 (14:16 -0800)
commit460a021391d32b7f2e9eb05a9a01946714174e3b
treea54672787d147121b669126c31c218868e1b1e56
parentd93b45aefc74b9c345ba3cdf3a227ee979a990cd
Log zvol truncate/discard operations

As the comments in zvol_discard() suggested, the discard operation
could be logged to the zil.  This is a port of the relevant code from
Nexenta as it was added in "701 UNMAP support for COMSTAR" and has been
attributed to the author of that commit.

References:
  https://github.com/Nexenta/illumos-nexenta/commit/b77b923
  https://github.com/zfsonlinux/zfs/blob/089fa91b/module/zfs/zvol.c#L637

Ported-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/zfs/zvol.c