[14/19] unix: make_socket -- Add more detailed logs

Submitted by Cyrill Gorcunov on Sept. 14, 2018, 2:08 p.m.

Details

Message ID 20180914140842.6462-15-gorcunov@gmail.com
State New
Series "unix: Add support for bindmounted dgram sockets"
Headers show

Commit Message

Cyrill Gorcunov Sept. 14, 2018, 2:08 p.m.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 criu/sk-unix.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index 232b213d02b4..116f81a67011 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -1895,6 +1895,8 @@  static int make_socket(struct unix_sk_info *ui, int sks[2], bool pair, bool disj
 	if (unlikely(ui->flags & USK_BINDMOUNT)) {
 		sks[0] = fdstore_get(ui->fdstore_mnt_id[0]);
 		sks[1] = fdstore_get(ui->fdstore_mnt_id[1]);
+		pr_debug("bindmount: Fetch socket pair id %#x ino %d\n",
+			 ui->ue->id, ui->ue->ino);
 		if (sks[0] < 0 || sks[1] < 0) {
 			pr_err("bindmount: Can't fetch id %#x socketpair from the store\n",
 			       ui->ue->id);
@@ -1905,10 +1907,15 @@  static int make_socket(struct unix_sk_info *ui, int sks[2], bool pair, bool disj
 
 		sks[0] = sks[1] = -1;
 		if (!pair) {
+			pr_debug("Create socket id %#x ino %d\n",
+				 ui->ue->id, ui->ue->ino);
 			ret = socket(PF_UNIX, ui->ue->type, 0);
 			sks[0] = ret;
-		} else
+		} else {
+			pr_debug("Create socket pair id %#x ino %d\n",
+				 ui->ue->id, ui->ue->ino);
 			ret = socketpair(PF_UNIX, ui->ue->type, 0, sks);
+		}
 
 		if (ret < 0) {
 			pr_perror("Can't create %s id %#x\n",