|
From: Wallace, B. <br...@qu...> - 2013-01-23 00:20:53
|
Hi, I've got a fuse implementation that is emulating a real char device to test a legacy app. At some point I switched to using the -o direct_io flag when starting the driver and everything worked fine. My read implementation returns a 0 until some data is ready. Now I'm trying to add a procfs type interface to my fuse driver, and have issues with read. Seems that with direct io read does not block and just gets 0 bytes indicating EOF. This would be fine, except the previous select call does not seem to block either. Shouldn't select on the fd block until some bytes are available to read? Am I missing something in my fuse implementation that is required for select to work correctly? Perhaps I need to call fuse_notify_poll() or something similar when data becomes ready? I don't see anything specific to select in the API. I also tried removing the direct_io flag, but then my legacy sw starts to timeout on reads, although I can see fuse returning N number of bytes from the read proc. Seems to happen on the second read for a particular fd. First one seems to go thru fine. This legacy app uses the poll call and a 1 sec sleep to read from the device. And I can see getattr being called every sec. Should I be posting available bytes to fstat as file size? I'm defining fuse version as #define FUSE_USE_VERSION 26 Looking for some advice. -Brooke |