diff options
author | Stanislav Kinsbursky <[email protected]> | 2013-01-04 15:34:55 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2013-01-04 16:11:45 -0800 |
commit | 4a674f34ba04a002244edaf891b5da7fc1473ae8 (patch) | |
tree | 14544a5d49b4a218bac3f5995503c8e208735cef /fs/jbd2/commit.c | |
parent | f9dd87f4738c7555aca2cdf8cb2b2326cafb0cad (diff) |
ipc: introduce message queue copy feature
This patch is required for checkpoint/restore in userspace.
c/r requires some way to get all pending IPC messages without deleting
them from the queue (checkpoint can fail and in this case tasks will be
resumed, so queue have to be valid).
To achive this, new operation flag MSG_COPY for sys_msgrcv() system call
was introduced. If this flag was specified, then mtype is interpreted as
number of the message to copy.
If MSG_COPY is set, then kernel will allocate dummy message with passed
size, and then use new copy_msg() helper function to copy desired message
(instead of unlinking it from the queue).
Notes:
1) Return -ENOSYS if MSG_COPY is specified, but
CONFIG_CHECKPOINT_RESTORE is not set.
Signed-off-by: Stanislav Kinsbursky <[email protected]>
Cc: Serge Hallyn <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Cc: Al Viro <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Michael Kerrisk <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions