]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit - contrib/unbound/libunbound/python/doc/examples/example2.rst
8942 zfs promote .../%recv should be an error
authorAlexander Motin <mav@FreeBSD.org>
Thu, 22 Feb 2018 01:42:13 +0000 (01:42 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Thu, 22 Feb 2018 01:42:13 +0000 (01:42 +0000)
commit613b0d87da86eb6fd50a95b9b38c5f37efe20f8d
tree424cbf487b7c7ce755624a9e163710c66098937f
parent3e6c7d54365e24a67c171f2f7f224efe5003fb32
parentdc763b80f4d97cdd878bf19fda4c3197b4b01749
8942 zfs promote .../%recv should be an error

illumos/illumos-gate@add927f8c8d101e16c23eb9cd270be4fd7edf7d5

Reported on the ZFSonLinux https://github.com/zfsonlinux/zfs/issues/4843,
fixed by https://github.com/zfsonlinux/zfs/pull/6339:

If we are in the middle of an incremental zfs receive, the child .../%recv
will exist. If you concurrently run zfs promote .../%recv, it will "work",
but then zfs gets confused. For example, there's no obvious way to destroy
the containing filesystem (because it is now a clone of its invisible child).

Attempting to do this promote should be an error. We could fix this by
having zfs_ioc_promote() check if zc_name contains a %, similar to
zfs_ioc_rename().

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: loli10K <ezomori.nozomu@gmail.com>
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c