From: Miklos S. <mi...@sz...> - 2008-07-18 16:51:21
|
On Fri, 18 Jul 2008, Nikolaus Rath wrote: > Miklos Szeredi <mi...@sz...> writes: > > On Thu, 17 Jul 2008, Nikolaus Rath wrote: > >> | > >> | Is this the "right" way to do things, or should I still try to implement > >> | create()? is there a down side to using mknod+open instead? > >> > >> That's an alternative way to do things, but using create() should work > >> just as well. > > > > Right. > > > > The EIO is caused by ->getattr() not returning a correct st_mode > > value, i.e. S_ISREG(buf.st_mode) fails. > > > > (Yeah, I know, should be better ducumented ;) > > If can explain it to me, I may provide another patch :-). > > > From what function is EIO returned if S_ISREG fails? I didn't quite > get it... Sorry, I'll try again :) Fuse will return EIO if the filesystem did something contradictory. More specifically, here libfuse will return EIO (to the original open(O_CREAT) or create() syscalls), if after calling the ->create() method, and then calling the ->getattr() method, the returned file type in st_mode is not a regular file. Miklos |