Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
a82cb23f
Commit
a82cb23f
authored
Jan 11, 2013
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pipe: Dump and restore pipe size
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
42d7bc07
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
pipes.c
pipes.c
+13
-1
pipe-data.proto
protobuf/pipe-data.proto
+1
-0
No files found.
pipes.c
View file @
a82cb23f
...
...
@@ -167,7 +167,7 @@ int restore_pipe_data(int img_type, int pfd, u32 id, struct pipe_data_rst **hash
}
if
(
!
pd
->
pde
->
bytes
)
return
0
;
goto
out
;
if
(
!
pd
->
data
)
{
pr_err
(
"Double data restore occurred on %#x
\n
"
,
id
);
...
...
@@ -207,7 +207,17 @@ int restore_pipe_data(int img_type, int pfd, u32 id, struct pipe_data_rst **hash
munmap
(
pd
->
data
,
pd
->
pde
->
bytes
);
pd
->
data
=
NULL
;
out:
ret
=
0
;
if
(
pd
->
pde
->
has_size
)
{
pr_info
(
"Restoring size %#x for %#x
\n
"
,
pd
->
pde
->
size
,
pd
->
pde
->
pipe_id
);
ret
=
fcntl
(
pfd
,
F_SETPIPE_SZ
,
pd
->
pde
->
size
);
if
(
ret
<
0
)
pr_perror
(
"Can't restore pipe size"
);
else
ret
=
0
;
}
err:
return
ret
;
}
...
...
@@ -400,6 +410,8 @@ int dump_one_pipe_data(struct pipe_data_dump *pd, int lfd, const struct fd_parms
pde
.
pipe_id
=
pipe_id
(
p
);
pde
.
bytes
=
bytes
;
pde
.
has_size
=
true
;
pde
.
size
=
pipe_size
;
if
(
pb_write_one
(
img
,
&
pde
,
PB_PIPES_DATA
))
goto
err_close
;
...
...
protobuf/pipe-data.proto
View file @
a82cb23f
message
pipe_data_entry
{
required
uint32
pipe_id
=
1
;
required
uint32
bytes
=
2
;
optional
uint32
size
=
3
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment