dvfs locking

Sean Middleditch elanthis at awesomeplay.com
Fri Mar 4 21:11:26 EET 2005


Locking is one of the more complex issues when dealing with file
storage, and probably the one issue I'm personally very ignorant about.

I'm wondering, first of all, do we need it, and why?  Do normal desktop
apps (and I only care about desktop apps, not GCC or Apache or some
whatever) normally lock the documents they're working on?  Is the
locking simply because they want to atomically write the file, or to
prevent modification while the document is in use?  Is the prevention of
modification due to trying to handle concurrent editing, versioning, or
because apps only keep portions of the document in memory and don't want
their "cache" changing under them?

It's not so much weather D-VFS will do locking or not, but how it will
do it.  If desktop apps do locking for atomic writes, then it makes a
hell of a lot more sense to just make write operations atomic if it's at
all possible and not requires applications to explicitly lock and unlock
the file during a write.  If applications use locking for versioning
purpose, where that's only even available on a limited number of
protocols/filesystems, it would make more sense to add a versioning API
versus making apps do a bunch of the details manually.

Do keep in mind that locking is not a supportable feature on many
protocols, so any case where locking would be used will still have to be
optional in all applications, since it isn't even emulatable on many
protocols.

Looking forward to your feedback and wisdom, everyone.  ;-)
-- 
Sean Middleditch <elanthis at awesomeplay.com>




More information about the xdg mailing list