[Devel] [PATCH v2 4/7] spfs: improve SPFS manager start debug and error output

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Thu Dec 21 14:07:14 MSK 2017


Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 criu/spfs.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/criu/spfs.c b/criu/spfs.c
index 223bf93..89fb9f9 100644
--- a/criu/spfs.c
+++ b/criu/spfs.c
@@ -127,6 +127,8 @@ static int start_spfs_manager(void)
 	char *socket_path = spfs_manager_socket_path();
 	int err = -ENOMEM, sock;
 
+	pr_info("Starting SPFS manager\n");
+
 	err = cr_system(-1, -1, -1, spfs_manager,
 			(char *[]){ "spfs-manager", "-vvvv",
 				 "-d",
@@ -135,13 +137,17 @@ static int start_spfs_manager(void)
 				 "--log-dir", spfs_manager_log_dir(),
 				 "--exit-with-spfs", NULL },
 			0);
-	pr_info("%s: spfs manager start result: %d\n", __func__, err);
-	if (err)
+	if (err) {
+		pr_err("failed to start SPFS manager binary: %d\n", err);
 		return err;
+	}
 
 	sock = sock_seqpacket_connect(socket_path);
-	if (sock < 0)
+	if (sock < 0) {
+		pr_err("failed to connect to SPFS manager via %s: %d\n",
+				socket_path, err);
 		return sock;
+	}
 
 	err = install_service_fd(SPFS_MNGR_SK, sock);
 	if (err < 0) {



More information about the Devel mailing list