From: Dan Nicholson Date: Fri, 17 Nov 2017 16:54:33 +0000 (+0000) Subject: lib/repo: Add debug messages when allocating tmpdir X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~29^2~20 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c60f31962947b5cc83fb939f854903f1ff837cf0;p=ostree.git lib/repo: Add debug messages when allocating tmpdir This code is pretty complex and has some races when reusing tmpdirs, so print some messages for debugging. Closes: #1346 Approved by: cgwalters --- diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 22214056..82695800 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -4979,6 +4979,7 @@ _ostree_repo_allocate_tmpdir (int tmpdir_dfd, (void)futimens (target_dfd, NULL); /* We found an existing tmpdir which we managed to lock */ + g_debug ("Reusing tmpdir %s", dent->d_name); ret_tmpdir.src_dfd = tmpdir_dfd; ret_tmpdir.fd = glnx_steal_fd (&target_dfd); ret_tmpdir.path = g_strdup (dent->d_name); @@ -5003,6 +5004,7 @@ _ostree_repo_allocate_tmpdir (int tmpdir_dfd, if (!did_lock) continue; + g_debug ("Using new tmpdir %s", new_tmpdir.path); ret_tmpdir = new_tmpdir; /* Transfer ownership */ new_tmpdir.initialized = FALSE; }