2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

pipes: Rename PIPE_NONALIG_DATA to PIPE_MAX_NONALIG_SIZE

And make it dep. on PIPE_DEF_BUFFERS, this points to
a limit from kernel side.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2012-06-19 12:30:00 +04:00
committed by Pavel Emelyanov
parent afee2e0f36
commit 6835e2ad98
2 changed files with 3 additions and 2 deletions

View File

@@ -166,7 +166,8 @@ struct pipe_data_entry {
* some part of pages may be loosed if data are not
* aligned in a file.
*/
#define PIPE_NONALIG_DATA (15 * PAGE_SIZE)
#define PIPE_DEF_BUFFERS 16
#define PIPE_MAX_NONALIG_SIZE ((PIPE_DEF_BUFFERS - 1) * PAGE_SIZE)
#define USK_EXTERN (1 << 0)

View File

@@ -373,7 +373,7 @@ dump:
pde.bytes = has_bytes;
pde.off = 0;
if (has_bytes > PIPE_NONALIG_DATA) {
if (has_bytes > PIPE_MAX_NONALIG_SIZE) {
off = lseek(fd_pipes, 0, SEEK_CUR);
off += sizeof(pde);
off &= PAGE_SIZE -1;