Commit 9dd414c2 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Pavel Emelyanov

aio: Change pair of debug messages

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

v2: Print mmap err code
Signed-off-by: 's avatarKirill Tkhai <ktkhai@vituozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent f55265f0
......@@ -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;
}
......
......@@ -584,8 +584,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;
}
......@@ -623,7 +624,7 @@ static int restore_aio_ring(struct rst_aio_ring *raio)
iocbp = (void *)iocb + sizeof(struct iocb);
if (IS_ERR(iocb)) {
pr_err("Can't mmap aio tmp buffer\n");
pr_err("Can't mmap aio tmp buffer: %ld\n", PTR_ERR(iocb));
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment