1. 29 Feb, 2012 5 commits
  2. 28 Feb, 2012 14 commits
  3. 27 Feb, 2012 1 commit
  4. 22 Feb, 2012 4 commits
  5. 21 Feb, 2012 2 commits
    • Kinsbursky Stanislav's avatar
      parasite: some cleanup · 385d7e03
      Kinsbursky Stanislav authored
      1) Added few missed successfull status setup - this looks
         redundant though, but unified with other functions.
      2) remove redundant argument in dump_pages_fini().
      Signed-off-by: 's avatarStanislav Kinsbursky <skinsbursky@openvz.org>
      Acked-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      385d7e03
    • Kinsbursky Stanislav's avatar
      restorer: close log file before detaching from crtools · acf604c6
      Kinsbursky Stanislav authored
      v2: it's toom risky to jump to address equal to line numbet (there could be
      valid executable code). So now jump is done to 0 address and %sp encodes line
      number (32 most significant bits) and error code (32 least significant bits).
      
      There is a race between log close by process being restoring and opened file
      desctriptors check in zdtm test suite - crtools can exit and compare file
      descriptors before detached restored process will perform all the rest tasks
      (including close of the log) and execute final system call:
      
       |--- dump/sleeping00/8578/dump.fd        2012-02-20 14:31:31.246096000 +0300
       |+++ dump/sleeping00/8578/restore.fd     2012-02-20 14:31:31.418095999 +0300
       |@@ -1,4 +1,5 @@
       |
       | 0 -> /dev/null
       | 1 -> /dev/null
       |+1023 -> /root/crtools/test/dump/sleeping00/8578/restore.log
       | 2 -> /dev/null
      
      The solution is to close log in restorer before final command received. But
      this leads to another problem: we have to inform somehow about possible errors
      afterwards This is done by forced segmentation fault and looks like this
      (dmesg):
      
      pipe00[4678]: segfault at 0 ip 00007f4c8ab77d02 sp 000002ed00000001 error 4
      
      Where %sp encodes line number (32 most significant bits) and error code (32
      least significant bits).
      Signed-off-by: 's avatarStanislav Kinsbursky <skinsbursky@openvz.org>
      Acked-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      acf604c6
  6. 20 Feb, 2012 11 commits
  7. 17 Feb, 2012 3 commits
    • Kir Kolyshkin's avatar
      open_proc() and friends: hide pid_dir · 447388d7
      Kir Kolyshkin authored
      This patch tries to introduce lazy and hidden pid_dir support,
      meaning one don't have to worry about pid_dir but the optimization
      is still there.
      
      The patch relies on the fact that we work with many /proc/pid files for
      one pid, then for another pid and so on, i.e. not in a random manner.
      
      The idea is when we call open_proc() with a new pid for the first time,
      the appropriate /proc/PID directory is opened and its fd is stored.
      Next call to open_proc() with the same PID only need to check that
      the PID is not changed. In case PID is changed, we close the old one
      and open/store a new one.
      
      Now the code using open_proc() and friends:
      - does not need to carry proc_pid around, pid is enough
      - does not need to call open_pid_proc()
      
      The only thing that can't be done in that "lazy" mode is closing the last
      PID fd, thus close_pid_proc().
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Acked-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      447388d7
    • Kir Kolyshkin's avatar
      Move error reporting to inside open_proc and friends · 5661d806
      Kir Kolyshkin authored
      ...and make it correctly print the file name we were unable to open.
      Also, error from fdopen[dir]() is now reported with file name as well.
      
      Note that open_proc() and friends need to be macros in order for
      pr_perror() to show actual file name and line number where error occured.
      
      Historical note: the original version of this patch was way more radical,
      changing openat() to open() and thus removing pid_dir (replacing with pid
      when needed) and open_proc_dir(), changing openat() to open(). The word
      from Pavel is he wants to keep the openat/pid_dir optimization because
      it saves two dentry lookups in kernel code for each open(). Because of
      this optimization (and desire to print correct file name in case
      of error) we have to carry both pid and pid_dir everywhere.
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Acked-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      5661d806
    • Kir Kolyshkin's avatar