Pavel Emelyanov
7b6a92c201
page-read: Fix pagemap message formatting
...
The vaddrs should be %x.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2014-01-23 13:23:53 +04:00
Andrey Vagin
73b689f81b
page-read: Don't check that an image file contains data
...
Modern tar and rsync can replace zero chunks with holes. So it's valid situation
and shouldn't abort the restore.
Signed-off-by: Andrey Vagin <avagin@openvz.org >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-12-26 22:49:37 +04:00
Andrew Vagin
a0049bfe6a
crtools: fixed format strings
...
Use the format specifier %zu instead of %lu to print a size_t integer.
Signed-off-by: Andrew Vagin <avagin@openvz.org >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-12-26 11:10:00 +04:00
Pavel Emelyanov
ba96e646a4
page-read: Fix naming
...
The open_page_at one is quite obfuscating.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-12-18 14:55:22 +04:00
Pavel Emelyanov
55b96d0113
page-read: Fix compilation on older distros
...
SEEK_DATA appeared quite recently, define it if not present
in system headers.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-12-18 14:53:30 +04:00
Tikhomirov Pavel
41433f4043
v3 deduplication: add auto-dedup local
...
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-12-18 14:52:04 +04:00
Tikhomirov Pavel
5db1adc567
v3 page-read: add open_page_rw to open pages in O_RDWR mode
...
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-12-18 14:51:20 +04:00
Tikhomirov Pavel
6336d537ac
v3 page-read: make function seek_pagemap_page can be used in dedup
...
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-12-18 14:51:09 +04:00
Tikhomirov Pavel
0f90727ddb
v3 page-read: add reuse posibility of pagemap2iovec
...
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-12-18 14:50:49 +04:00
Tikhomirov Pavel
530b6d11fd
v3 page-read: replace read_pagemap_page_from_parent with seek_pagemap_page
...
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-12-18 14:50:48 +04:00
Tikhomirov Pavel
c49219bf6a
v3 page-read: add print error in case of bad or corrupted image
...
1. add it instead of BUG_ON
we should print error if warn is assigned to true
2. correct use of read_pagemap_page_from_parent, provide warn = true
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-12-18 14:50:45 +04:00
Tikhomirov Pavel
164bc4bdf1
v3 page-read: check that don't read page from hole
...
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-12-18 14:50:44 +04:00
Tikhomirov Pavel
7be5a1b95d
v2 page-read: Check parent pagemap read return value
...
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-12-02 15:28:59 +04:00
Andrey Vagin
07fc6cf394
crtools: don't include image.h in crtools.h
...
Signed-off-by: Andrey Vagin <avagin@openvz.org >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-11-06 15:42:09 +04:00
Andrey Vagin
824403a009
crtools: create new header for servicefd stuff (v2)
...
v2: generate patch relative to the official git.
Signed-off-by: Andrey Vagin <avagin@openvz.org >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-11-06 12:43:02 +04:00
Andrey Vagin
4e6cd36885
page-read: print errno in case of failure
...
(00.023059) 3898: Error (page-read.c:129): Can't read mapping page -1: Bad address
Signed-off-by: Andrey Vagin <avagin@openvz.org >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-08-28 17:00:17 +04:00
Andrey Vagin
dd38ae16d1
mm: handle new processes which created between snapshots (v2)
...
These processes don't have image files in a parent snapshot and crtools
should not fail in this case.
https://bugzilla.openvz.org/show_bug.cgi?id=2636
v2: return NULL from mem_snap_init, if a parent image is absent.
Signed-off-by: Andrey Vagin <avagin@openvz.org >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-06-27 23:47:15 +04:00
Andrey Vagin
c97911a5f2
mm: initialize PageEntry pe to NULL in PagemapEntry
...
Otherwise it contains trash and BUG at page-read.c:98 may be triggered.
https://bugzilla.openvz.org/show_bug.cgi?id=2633
Signed-off-by: Andrey Vagin <avagin@openvz.org >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-06-22 13:15:27 +04:00
Alexander Kartashov
4d4543f66e
page-read: fixed format strings
...
Use the format specifier PRIx64 instead of %lx to print an off_t integer.
Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-04-30 18:31:35 +04:00
Pavel Emelyanov
febdd8a2bf
page-read: Factor out PagemapEntry to iovec conversion
...
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-04-16 14:36:05 +04:00
Kir Kolyshkin
d90d4b1b88
Fix typos in log messages
...
Someone has to do it, right?..
Signed-off-by: Kir Kolyshkin <kir@openvz.org >
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-04-15 12:46:25 +04:00
Pavel Emelyanov
3307bfd8f1
restore: Restore memory from stack of snapshots
...
This one is a little bit more tricky that dump. On restore we
should open the chain of pagemap-s (by "parent" links). Then for
every pagemap with in_parent set we should go to parent and ask
for the page. Parent, in turn, should properly determine where
the respective page is in his pagemap and position the page.img's
position respectively.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-04-12 19:45:22 +04:00
Pavel Emelyanov
757f9c570f
page-read: New abstraction for restoring pages
...
Now we have 2 forms of storing pages -- legacy pages.img and
new pagemap + pages image. We'll have one more (ovz) and the
pagemap + pages will be stacked (snapshot restore). Thus it's
handy to have this as an page-reader object.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com >
2013-04-12 19:45:12 +04:00