(Illustration by Gaich Muramatsu)
On Wed, Sep 01, 2004 at 12:49:27PM -0400, Jan Harkes wrote: > So flocks might not really be the best solution for pinning just yet. Just read up on flock and fcntl(F_xxxLK,...) and they clearly wouldn't work since venus would have to keep open filedescriptors for any object that is open or dirty. The open files are not so much of a problem because we already do that by handing the open fd back to the kernel, but it probably isn't a good idea for non-open, dirty files. If venus dies, the cache daemon could unlink everything in sight. I guess the modebits are probably a better option, remove 'rw' permissions or something whenever a file is open or dirty (nice side effect that it prevents most processes from mucking with currently active or dirty files). This also has the advantage that we can use ctime instead of atime, which is often not updated on laptops. We also need a way to deal with races between lstat/unlink in the reaper and chmod/create by venus. So there will be some extra overhead whenever we open an existing container file. But we're probably doing much more work than that already. JanReceived on 2004-09-01 14:16:07