]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
Fix ztest truncated cache file
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 10 Jun 2016 13:45:26 +0000 (14:45 +0100)
committerKamal Mostafa <kamal@canonical.com>
Mon, 27 Jun 2016 21:34:47 +0000 (14:34 -0700)
commitd710d33a2baa6607738a9ca1fcdc9d859f58c38a
treeef06c050aedd3d12bdf845b5c00e936dc1626c64
parent978ae5801bab1b9dc41c5b57937a317ec7ac1ece
Fix ztest truncated cache file

BugLink: http://bugs.launchpad.net/bugs/1587686
Commit efc412b updated spa_config_write() for Linux 4.2 kernels to
truncate and overwrite rather than rename the cache file.  This is
the correct fix but it should have only been applied for the kernel
build.  In user space rename(2) is needed because ztest depends on
the cache file.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4129
(cherry picked from zfs commit 151f84e2c32f690b92c424d8c55d2dfccaa76e51)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
zfs/module/zfs/spa_config.c