Hi Joseph,
Thanks a lot for your comments.
Actually, I think I have found the root cause why the iocb is freed.
As __generic_file_write_iter() returns -EIOCBQUEUED, aio_complete() will
be invoked asynchronously
against write_iter()->ocfs2_file_write_iter().
If -EIOCBQUEUED is not returned, aio_
Hi Changwei,
I agree with Gang that currently we still haven't figured out why iocb
was freed. Though you fix won't bring any side effect, it looks like a
workaround.
That means, the freed iocb may still have risk in other place.
Thanks,
Joseph
On 18/5/8 23:23, Changwei Ge wrote:
> Hi Gang,
>
>
Hi Gang,
I don't think this patch is a workaround trick.
We do face the risk using freed iocb although it is actually indeed hard
to encounter, it still exists.
So I propose to fix it making ocfs2 more reliable.
Moreover, this patch has been kept in -mm tree for one month. Can anyone
help re
Hi Changwei,
The code change just works around the problem, but theoretically the IOCB
object should not be freed before which is handled.
Anyway, if we can find the root cause behind via some way (e.g. inject delay in
some place), the result is more perfect.
Thanks
Gang
>>>
> Hi Jun,
>
>
Hi Jun,
On 2018/4/11 9:52, piaojun wrote:
> Hi Changwei,
>
> It seems other codes which try to access 'iocb' will also cause error,
> right? I think we should find the reason why 'iocb' is freed first.
Which code snippet do you mean? Actually, I have checked most of other parts in
write_iter()
Hi Changwei,
It seems other codes which try to access 'iocb' will also cause error,
right? I think we should find the reason why 'iocb' is freed first.
thanks,
Jun
On 2018/4/11 9:07, Changwei Ge wrote:
> Hi Jun,
>
> On 2018/4/11 8:52, piaojun wrote:
>> Hi Changwei,
>>
>> It looks like a code bu
Hi Jun,
On 2018/4/11 8:52, piaojun wrote:
> Hi Changwei,
>
> It looks like a code bug, and 'iocb' should not be freed at this place.
> Could this BUG reproduced easily?
Actually, it's not easy to be reproduced since IO is much slower than CPU
executing instructions. But the logic here is broken
Hi Changwei,
It looks like a code bug, and 'iocb' should not be freed at this place.
Could this BUG reproduced easily?
thanks,
Jun
On 2018/4/10 20:00, Changwei Ge wrote:
> When -EIOCBQUEUED returns, it means that aio_complete() will be called
> from dio_complete(), which is an asynchronous progr