Commit f0decea7 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

log: remove pid from messages

Now log messages may be splitted by pid
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent fc7bedc5
......@@ -225,8 +225,8 @@ static int read_and_open_vmas(int pid, struct list_head *vmas, int *nr_vmas)
if (!(vma_entry_is(&vma->vma, VMA_AREA_REGULAR)))
continue;
pr_info("%d: Opening 0x%016lx-0x%016lx 0x%016lx vma\n",
pid, vma->vma.start, vma->vma.end, vma->vma.pgoff);
pr_info("Opening 0x%016lx-0x%016lx 0x%016lx vma\n",
vma->vma.start, vma->vma.end, vma->vma.pgoff);
if (vma_entry_is(&vma->vma, VMA_AREA_SYSVIPC))
ret = vma->vma.shmid;
......@@ -310,7 +310,7 @@ err:
static int restore_one_alive_task(int pid)
{
pr_info("%d: Restoring resources\n", pid);
pr_info("Restoring resources\n");
if (prepare_fds(me))
return -1;
......@@ -639,7 +639,7 @@ static int restore_task_with_children(void *_arg)
exit(1);
}
pr_info("%d: Restoring %d children:\n", me->pid, me->nr_children);
pr_info("Restoring %d children:\n", me->nr_children);
for (i = 0; i < me->nr_children; i++) {
ret = fork_with_pid(me->children[i], 0);
if (ret < 0)
......@@ -959,7 +959,7 @@ static int sigreturn_restore(pid_t pid, struct list_head *tgt_vmas, int nr_vmas)
int *fd_core_threads;
pr_info("%d: Restore via sigreturn\n", pid);
pr_info("Restore via sigreturn\n");
restore_code_len = 0;
restore_task_vma_len = 0;
......@@ -1011,8 +1011,8 @@ static int sigreturn_restore(pid_t pid, struct list_head *tgt_vmas, int nr_vmas)
restore_thread_vma_len = sizeof(*thread_args) * me->nr_threads;
restore_thread_vma_len = round_up(restore_thread_vma_len, 16);
pr_info("%d: %d threads require %ldK of memory\n",
pid, me->nr_threads,
pr_info("%d threads require %ldK of memory\n",
me->nr_threads,
KBYTES(restore_thread_vma_len));
restore_thread_vma_len = round_up(restore_thread_vma_len, PAGE_SIZE);
......
......@@ -494,7 +494,7 @@ static int open_transport_fd(int pid, struct fdinfo_entry *fe, struct file_desc
transport_name_gen(&saddr, &sun_len, getpid(), fe->fd);
pr_info("\t%d: Create transport fd for %d\n", pid, fe->fd);
pr_info("\tCreate transport fd for %d\n", fe->fd);
list_for_each_entry(fle, &d->fd_info_head, desc_list)
if ((fle->pid == pid) && (fle->fe.fd == fe->fd))
......@@ -561,7 +561,7 @@ static int open_fd(int pid, struct fdinfo_entry *fe, struct file_desc *d)
return -1;
}
pr_info("\t%d: Create fd for %d\n", pid, fe->fd);
pr_info("\tCreate fd for %d\n", fe->fd);
list_for_each_entry(fle, &d->fd_info_head, desc_list) {
if (pid == fle->pid) {
......@@ -604,7 +604,7 @@ static int receive_fd(int pid, struct fdinfo_entry *fe, struct file_desc *d)
if (fle->pid == pid)
return 0;
pr_info("\t%d: Receive fd for %d\n", pid, fe->fd);
pr_info("\tReceive fd for %d\n", fe->fd);
tmp = recv_fd(fe->fd);
if (tmp < 0) {
......@@ -627,7 +627,7 @@ static int open_fdinfo(int pid, struct fdinfo_entry *fe, int state)
struct file_desc *fdesc;
fdesc = find_file_desc(fe);
pr_info("\t%d: Restoring fd %d (state -> %d)\n", pid, fe->fd, state);
pr_info("\tRestoring fd %d (state -> %d)\n", fe->fd, state);
switch (state) {
case FD_STATE_PREP:
......@@ -651,7 +651,7 @@ int prepare_fds(struct pstree_item *me)
struct fdinfo_list_entry *fle;
int nr = 0;
pr_info("%d: Opening fdinfo-s\n", me->pid);
pr_info("Opening fdinfo-s\n");
for (state = 0; state < FD_STATE_MAX; state++)
list_for_each_entry(fle, &me->rst->fds, ps_list) {
......
......@@ -95,7 +95,7 @@ int prepare_shmem_pid(int pid)
if (ret <= 0)
break;
pr_info("%d: vma 0x%lx 0x%lx\n", pid, vi.start, vi.end);
pr_info("vma 0x%lx 0x%lx\n", vi.start, vi.end);
if (!vma_entry_is(&vi, VMA_ANON_SHARED))
continue;
......@@ -122,10 +122,10 @@ static int shmem_wait_and_open(int pid, struct shmem_info *si)
sprintf(path, "/proc/%d/map_files/%lx-%lx",
si->pid, si->start, si->end);
pr_info("%d: Waiting for [%s] to appear\n", pid, path);
pr_info("Waiting for [%s] to appear\n", path);
futex_wait_until(&si->lock, 1);
pr_info("%d: Opening shmem [%s] \n", pid, path);
pr_info("Opening shmem [%s] \n", path);
ret = open(path, O_RDWR);
if (ret < 0)
pr_perror(" %d: Can't stat shmem at %s",
......@@ -169,7 +169,7 @@ int get_shmem_fd(int pid, struct vma_entry *vi)
int f;
si = find_shmem(rst_shmems, vi->shmid);
pr_info("%d: Search for 0x%016lx shmem 0x%lx %p/%d\n", pid, vi->start, vi->shmid, si, si ? si->pid : -1);
pr_info("Search for 0x%016lx shmem 0x%lx %p/%d\n", vi->start, vi->shmid, si, si ? si->pid : -1);
if (!si) {
pr_err("Can't find my shmem 0x%016lx\n", vi->start);
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