From: Gregory H. <gre...@gm...> - 2011-05-26 19:31:21
|
Hi all, I am writing a native erlang libfuse (https://github.com/ghaskins/efuse) framework, and I ran into an issue coming out of the gate that perhaps someone here can explain. So, I know that the fuse_in_header is 40-bytes, and the fuse_init_in payload is 16. So when I first connect to the fd returned from fuse_mount(), the kernel tries to send me a FUSE_INIT packet. The thing I can't wrap my head around atm is if I do a read(fd, 56), I get back the 56 byte FUSE_INIT packet, but if I do a read(fd, 40) the kernel blocks. What I expect is that I can do a partial read to get the header, including the .len field, and then do a subsequent read to get the remainer. Is that not supported, or am I doing something wrong? In case it matters, I am on OpenSUSE 11.4, Linux linux-mp 2.6.37.6-0.5-desktop #1 SMP PREEMPT 2011-04-25 21:48:33 +0200 x86_64 x86_64 x86_64 GNU/Linux Kind Regards, -Greg |