Skip to content

RFC Fix splice for packetized pipes

Stanislav Kinsburskiy linux-fsdevel lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3pipe: make is_packetized() non-static and declare in pipe_fs_i.hfs/pipe.c include/linux/pipe_fs_i.h+3 -10 replies
2/3splice: new SPLICE_F_PACKET flag introducedinclude/linux/splice.h+5 -00 replies
3/3splice: add support of splicing to packetized pipefs/splice.c+8 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/3] Fix splice for packetized pipes

With introduction of packetized pipes, splice wasn't updated to respect this new behaviour.
In terms of splice it means, that it never set PIPE_BUF_FLAG_PACKET on created pipe buffer regarless pipe operating mode, thus breaking the whole logic.
To fix this, new SPLICE_F_PACKET flag was introduced. It's supposed to be used only in kernel and set, when write pipe is in packetized mode. In splice_to_pipe() it's converted into created pipe buffer PIPE_BUF_FLAG_PACKET flag.

The following series implements...

---

Stanislav Kinsburskiy (3):
pipe: make is_packetized() non-static and declare in pipe_fs_i.h
splice: new SPLICE_F_PACKET flag introduced
splice: add support of splicing to packetized pipe

 fs/pipe.c                 |    2 +-
 fs/splice.c               |    8 ++++++++
 include/linux/pipe_fs_i.h |    2 ++
 include/linux/splice.h    |    5 +++++
 4 files changed, 16 insertions(+), 1 deletion(-)