Commit 0dd4788a by Jeff Cook

Reflow ZFS check to follow the style of the overlayfs return.

parent 4bc6ecbf
...@@ -543,16 +543,13 @@ int lxc_rootfs_init(struct lxc_conf *conf, bool userns) ...@@ -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"); 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->path) {
if (rootfs->bdev_type && if (rootfs->bdev_type) {
(strequal(rootfs->bdev_type, "overlay") || if (strequal(rootfs->bdev_type, "overlay") || strequal(rootfs->bdev_type, "overlayfs"))
strequal(rootfs->bdev_type, "overlayfs"))) return log_trace_errno(0, EINVAL, "Not pinning on stacking filesystem");
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); dfd_path = open_at(-EBADF, rootfs->path, PROTECT_OPATH_FILE, 0, 0);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment