[CRIU] [PATCH 1/3] aio: Change pair of debug messages

Kirill Tkhai ktkhai at virtuozzo.com
Tue May 17 11:56:42 PDT 2016


The first is a preparation to kill aio_nr_req. The second
is to have more debug info at restore.

Signed-off-by: Kirill Tkhai <ktkhai at vituozzo.com>
---
 criu/aio.c          |    5 ++---
 criu/pie/restorer.c |    5 +++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/criu/aio.c b/criu/aio.c
index 888a640..26bca30 100644
--- a/criu/aio.c
+++ b/criu/aio.c
@@ -13,9 +13,6 @@ int dump_aio_ring(MmEntry *mme, struct vma_area *vma)
 	int nr = mme->n_aios;
 	AioRingEntry *re;
 
-	pr_info("Dumping AIO ring @%"PRIx64", %u reqs\n",
-			vma->e->start, vma->aio_nr_req);
-
 	mme->aios = xrealloc(mme->aios, (nr + 1) * sizeof(re));
 	if (!mme->aios)
 		return -1;
@@ -30,6 +27,8 @@ int dump_aio_ring(MmEntry *mme, struct vma_area *vma)
 	re->ring_len = vma->e->end - vma->e->start;
 	mme->aios[nr] = re;
 	mme->n_aios = nr + 1;
+	pr_info("Dumping AIO ring @%"PRIx64"-%"PRIx64"\n",
+		vma->e->start, vma->e->end);
 	return 0;
 }
 
diff --git a/criu/pie/restorer.c b/criu/pie/restorer.c
index 9249b9d..b052f81 100644
--- a/criu/pie/restorer.c
+++ b/criu/pie/restorer.c
@@ -586,8 +586,9 @@ static int restore_aio_ring(struct rst_aio_ring *raio)
 	i = (raio->len - sizeof(struct aio_ring)) / sizeof(struct io_event);
 	if (tail >= ring->nr || head >= ring->nr || ring->nr != i ||
 	    new->nr != ring->nr) {
-		pr_err("wrong aio parametrs: tail=%x head=%x nr=%x len=%lx\n",
-			tail, head, raio->nr_req, raio->len);
+		pr_err("wrong aio: tail=%x head=%x req=%x old_nr=%x new_nr=%x expect=%x\n",
+			tail, head, raio->nr_req, ring->nr, new->nr, i);
+
 		return -1;
 	}
 



More information about the CRIU mailing list