Repository navigation
Fix pipe read/write using wrong offset in io_uring backend - #299
Conversation
📝 WalkthroughWalkthroughTwo IO_uring pipe operation submissions were modified: the offset parameter in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
1716ece to
62a73c6
Compare
PipeRead and PipeWrite used offset 0 in prep_readv/prep_writev, which in io_uring translates to preadv2/pwritev2 at file position 0. This caused repeated writes to overwrite from the beginning when stdout was redirected to a file. Use offset -1 to indicate "use current file position", matching the behavior of regular readv/writev syscalls.
62a73c6 to
a3a7257
Compare
Summary
0forprep_readv/prep_writev, which translates topreadv2/pwritev2at file position 0> output.txt)-1(@bitCast(@as(i64, -1))) which tells io_uring to use the current file position, matching regularreadv/writevbehavior