Re: [PATCH 2/2] io_uring: fix the judging condition in io_sequence_defer

2019-07-16 Thread Jens Axboe
On 7/14/19 8:34 PM, Zhengyuan Liu wrote: > > On 7/14/19 5:43 AM, Jens Axboe wrote: >> On 7/12/19 9:58 PM, Zhengyuan Liu wrote: >>> sq->cached_sq_head and cq->cached_cq_tail are both unsigned int. >>> if cached_sq_head gets overflowed before cached_cq_tail, then we >>> may miss a barrier req. As ca

Re: [PATCH 2/2] io_uring: fix the judging condition in io_sequence_defer

2019-07-13 Thread Jens Axboe
On 7/12/19 9:58 PM, Zhengyuan Liu wrote: > sq->cached_sq_head and cq->cached_cq_tail are both unsigned int. > if cached_sq_head gets overflowed before cached_cq_tail, then we > may miss a barrier req. As cached_cq_tail moved always following > cached_sq_head, the NQ should be enough. This (and the

[PATCH 2/2] io_uring: fix the judging condition in io_sequence_defer

2019-07-12 Thread Zhengyuan Liu
sq->cached_sq_head and cq->cached_cq_tail are both unsigned int. if cached_sq_head gets overflowed before cached_cq_tail, then we may miss a barrier req. As cached_cq_tail moved always following cached_sq_head, the NQ should be enough. Signed-off-by: Zhengyuan Liu --- fs/io_uring.c | 2 +- 1 fil