On 12/26/2010 05:08 PM, Olaf van der Spek wrote: >> Please tell us what for. If you have immediate need to replace the >> name, then you need the durability of fsync. If you don't have >> immediate need, then you can use another name, surely (until it >> comes time you want to switch names, at that point you want >> durability so you fsync then rename). > > Temp file, rename has issues with losing meta-data. > What if you use a soft link? wouldn't that solve all of your problems? - do your fsync/fdatasync of choice in a *backend thread* then at the return - point set to the new link, fsync the link it's very small, therefore fast. - Then delete the old source file. You need a simple "name-version" schema and the "name" is kept soft linked. (You might even skip the last step above and implement an undo stack, some background management caps on history size) >> >>> and this way has other >>> issues, like losing file meta-data. >> With soft links this is persevered? Same system can be used with lots of files. where the final switch is the set of a single soft-link say to a folder of related files. Just me $0.017 Boaz -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html