From: Joshua J. B. <de...@co...> - 2006-08-10 23:07:26
|
This is discussed a bit in the FAQ. See=20 http://fuse.sourceforge.net/wiki/index.php/FAQ#API , particularly "Wouldn't= =20 it be simpler if there were a single close() method?" . The short answer is, it's not possible because the Linux kernel isn't=20 designed that way. It's not possible for FUSE to know which close() call=20 from userspace triggered a given release(). On Thursday 10 August 2006 15:56, Gerard J. Cerchio wrote: > I am implementing a media independent archive file system in FUSE. > > According to the documentation in fuse.h, flush is not guaranteed to be > called at any time in the write cycle and there is no way to > discriminate a final flush from any intermediate one. > > I therefore must perform all my post write data integrity checks in the > release call and return an error if the data is not verified on the > media. In fact, I actually transfer all my data to the target media > during the release. > > Whether or not the application checks the status of the close call is a > controllable risk in the environments that the file system is going to > be used. > > The problem is there is no processing of the release call's error return > in the FUSE library system. In fact, the library call for do_release is > declared a void. > > My question is "Does FUSE have a deep problem handling error returns > from release or is this a trivial modification to the FUSE project?" > > It seemed to me that the solution required trivial changes in fuse.c: > > In the method do_release, change to return the error code > In the method fuse_release pass the return code to reply_error. > > I have implemented the changes and now see error codes being passed to > the debug trace. Alas, I do not see the error return being passed to > the fclose in my little test program that does check error returns on > release. > > Any one care to comment? Is this going to require changes to the kernel > module? > > Gerard Cerchio > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > fuse-devel mailing list > fus...@li... > https://lists.sourceforge.net/lists/listinfo/fuse-devel =2D-=20 Joshua J. Berry "I haven't lost my mind -- it's backed up on tape somewhere." -- /usr/games/fortune |