On 06/04/2012 04:07 PM, MORITA Kazutaka wrote: >> I am not 100% about this issue. It is from the experience from >> > development of sheepfs, when I use a single FD to read/write. Since FUSE >> > will issue highly concurrent requests, I noticed the same error as above >> > example: the error code is quite random (see above is '54014b01'). >> > >> > After a long time debugging, I came to a conclusion that the problem >> > *might* be: >> > >> > The subsequent read/write requests interleaves with the previous one, >> > and wrongly read the response. > I think we should reveal how they interleave before working out how to > fix. > > The current fd cache seems to allow multiple accesses to the same node > because cached_fds is a thread-local variable and there is no fd which > is used by multiple threads at the same time. Ah, yes, it is thread local. Then I have no idea how the ret value could be random, I don't find a reliable way to reproduce this problem. Thanks, Yuan |