From: Feng S. <ste...@gm...> - 2012-09-17 08:15:56
|
Hi Jason, Normally a POSIX-compliant filesystem doesn't need you to flush everything in close(). Flush-in-close is mostly needed in a close-to-open networked filesystem such as NFS. So my suggestion is maybe you could redesign you filesystem to split the file name (namespace) from the file itself (inode and data). This make it possible to rename a file without any operations on data or file attributes...... Be aware that this is actually a must-have potential POSIX requirement because even the file is not closed, it has to be able to be renamed. On Sun, Sep 16, 2012 at 12:27 AM, Kelly Smith <kel...@sb...> wrote: > Hi, > > I am trying to build a POSIX-compliant filesystem using FUSE, however, I > am running into a problem because release() is called asynchronous to > the user’s close() operation. I am using fuse 2.7.4, which I know isn’t > recent, but a search of the mailing list and a ‘net search seems to show > that this issue has not been resolved yet. > > I found this thread regarding asynchronous release: > > http://sourceforge.net/mailarchive/forum.php?thread_name=87wslu4dq9.fsf%40frosties.localdomain&forum_name=fuse-devel > > Unfortunately, with an asynchronous release(), rsync on my filesystem > does not work without the --inplace option, because by default rsync > creates the destination file in a temporary location via > open-write...-close, then does a rename of the file to the proper > destination. Because my filesystem does write buffering, the close() > must also do a final flush. But that may not happen before the rename > occurs, in which case I am left with an incomplete file. > > I do not know how to fix this problem in my filesystem. I'd be glad to > hear any suggestions for how I can fix this, otherwise it seems that the > only solution is to make release() synchronous. > > Thanks, > Jason > > > > ------------------------------------------------------------------------------ > How fast is your code? > 3 out of 4 devs don\\\'t know how their code performs in production. > Find out how slow your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219672;13503038;z? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > fuse-devel mailing list > fus...@li... > https://lists.sourceforge.net/lists/listinfo/fuse-devel -- Feng Shuo Tel: (86)10-59851155-2116 Fax: (86)10-59851155-2008 Tianjin Zhongke Blue Whale Information Technologies Co., Ltd 10th Floor, Tower A, The GATE building, No. 19 Zhong-guan-cun Avenue Haidian District, Beijing, China Postcode 100080 |