From: Harris, J. <Je...@ai...> - 2004-06-21 15:21:59
|
I have had to make a couple changes to the files after the patch supplied by Miklos. The first change was one for our implementation where we wanted to have one thread handle multiple filesystem mounts. The changes to fuse.c allow for only one message to be read at a time. This allows for our select loop to multiplex between the FUSE file descriptors without blocking the app. I also added an accessor to the exited flag so my daemon could detect a close and remove the mount from the select. The code seems to be working ok. Is there something I may have missed? The second change was to the implementation of the read and write calls for the dynamic files. There is an 8k message size limit. Some programs were using values which caused the read and write messages to exceed 8k. This caused error messages from the kernel and a disconnect of the module from the daemon. I modified the read call to read a max of 4k at a time. For writes, applications were assuming that their writes were atomic and not paying attention to the returned number of bytes written. So, I modified the write call to loop and write all of the user data in 4k chunks. This size could be increased to something nearer to the 8k max message size, but 4k was a nice round number. Jeff -----Original Message----- From: David Shaw [mailto:ds...@ja...] Sent: Monday, June 21, 2004 10:39 AM To: avf...@li... Subject: Re: [Avf-fuse-dev] Dynamic files with FUSE On Tue, Jun 08, 2004 at 06:08:45PM +0200, Miklos Szeredi wrote: > > > I would prefer solution #1. These virtual files are not accessed that > > frequently, so they don't really need to be cached. In fact caching may be > > bad in that these files will change dynamically. Do you have any guesses as > > to the scope or timeframe for implementing the first solution? > > Attached a prototype, which is a patch against the 1.1 release. Not > terribly well tested, but seems to work. I'm going on a holiday for > a week, so I won't integrate this into CVS until I come back. Any chance of committing this? I could really use it as well. David ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ Avf-fuse-dev mailing list Avf...@li... https://lists.sourceforge.net/lists/listinfo/avf-fuse-dev |