The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1824
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Christian Brauner <[email protected]>
From 24f84f1e3142373169ee3f6d1d90b13e6cad65d3 Mon Sep 17 00:00:00 2001 From: Christian Brauner <[email protected]> Date: Wed, 20 Sep 2017 10:13:30 +0200 Subject: [PATCH] zfs: return error directly when zfs creation fails Signed-off-by: Christian Brauner <[email protected]> --- src/lxc/storage/zfs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lxc/storage/zfs.c b/src/lxc/storage/zfs.c index 1198fd52b..be90e5a11 100644 --- a/src/lxc/storage/zfs.c +++ b/src/lxc/storage/zfs.c @@ -754,12 +754,14 @@ int zfs_create(struct lxc_storage *bdev, const char *dest, const char *n, cmd_args.argv = argv; ret = run_command(cmd_output, sizeof(cmd_output), zfs_create_exec_wrapper, (void *)&cmd_args); - if (ret < 0) + if (ret < 0) { ERROR("Failed to create zfs dataset \"%s\": %s", bdev->src, cmd_output); - else if (cmd_output[0] != '\0') + return -1; + } else if (cmd_output[0] != '\0') { INFO("Created zfs dataset \"%s\": %s", bdev->src, cmd_output); - else + } else { TRACE("Created zfs dataset \"%s\"", bdev->src); + } ret = mkdir_p(bdev->dest, 0755); if (ret < 0 && errno != EEXIST) {
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
