]> git.proxmox.com Git - mirror_zfs.git/commit - cmd/zfs/zfs_main.c
Fix the creation of ZPOOL_HIST_CMD pool history entries.
authorTim Chase <tim@chase2k.com>
Mon, 23 Dec 2013 20:06:34 +0000 (14:06 -0600)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 7 Jan 2014 17:00:26 +0000 (09:00 -0800)
commitfb8e608d9dacf2f6703da8c853f6086e4dd79824
treeebd6b931056bc41da0006c4c112aa5974832c909
parent5d862cb0d9a4b6dcc97a88fa0d5a7a717566e5ab
Fix the creation of ZPOOL_HIST_CMD pool history entries.

Move the libzfs_fini() after the zpool_log_history() call so the
ZPOOL_HIST_CMD entry can get written.

Fix the handling of saved_poolname in zfsdev_ioctl()
which was broken as part of the stack-reduction work in
a16878805388c4d96cb8a294de965071d138a47b.

Since ZoL destroys the TSD data in which the previously successful
ioctl()'s pool name is stored following every vop, the ZFS_IOC_LOG_HISTORY
ioctl has a very important restriction: it can only successfully write
a long entry following a successful ioctl() if no intervening vops have
been performed.  Some of zfs subcommands do perform intervening vops and
to do the logging themselves. At the moment, the "create" and "clone"
subcommands have been modified appropriately.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1998
cmd/zfs/zfs_main.c
module/zfs/zfs_ioctl.c