Commit 6835e2ad authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

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: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent afee2e0f
...@@ -166,7 +166,8 @@ struct pipe_data_entry { ...@@ -166,7 +166,8 @@ struct pipe_data_entry {
* some part of pages may be loosed if data are not * some part of pages may be loosed if data are not
* aligned in a file. * 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) #define USK_EXTERN (1 << 0)
......
...@@ -373,7 +373,7 @@ dump: ...@@ -373,7 +373,7 @@ dump:
pde.bytes = has_bytes; pde.bytes = has_bytes;
pde.off = 0; pde.off = 0;
if (has_bytes > PIPE_NONALIG_DATA) { if (has_bytes > PIPE_MAX_NONALIG_SIZE) {
off = lseek(fd_pipes, 0, SEEK_CUR); off = lseek(fd_pipes, 0, SEEK_CUR);
off += sizeof(pde); off += sizeof(pde);
off &= PAGE_SIZE -1; off &= PAGE_SIZE -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