From: Jeff Cook Date: Sun, 9 May 2021 11:29:05 +0000 (-0600) Subject: Reflow ZFS check to follow the style of the overlayfs return. X-Git-Tag: lxc-5.0.0~175^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0dd4788a84de4ceb2a246c1ee7bc7e2242e61f8a;p=thirdparty%2Flxc.git Reflow ZFS check to follow the style of the overlayfs return. Per https://github.com/lxc/lxc/pull/3831#discussion_r628865713 Signed-off-by: Jeff Cook --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index dd5b04388..123591cf8 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -543,16 +543,13 @@ int lxc_rootfs_init(struct lxc_conf *conf, bool userns) return syserror_set(-EINVAL, "Idmapped rootfs currently only supports the \"dir\" storage driver"); } - if (rootfs->bdev_type && strequal(rootfs->bdev_type, "zfs")) { - TRACE("Not pinning because container uses ZFS"); - goto out; - } - if (rootfs->path) { - if (rootfs->bdev_type && - (strequal(rootfs->bdev_type, "overlay") || - strequal(rootfs->bdev_type, "overlayfs"))) - return log_trace_errno(0, EINVAL, "Not pinning on stacking filesystem"); + if (rootfs->bdev_type) { + if (strequal(rootfs->bdev_type, "overlay") || strequal(rootfs->bdev_type, "overlayfs")) + return log_trace_errno(0, EINVAL, "Not pinning on stacking filesystem"); + if (strequal(rootfs->bdev_type, "zfs")) + return log_trace_errno(0, EINVAL, "Not pinning on ZFS filesystem"); + } dfd_path = open_at(-EBADF, rootfs->path, PROTECT_OPATH_FILE, 0, 0); } else {