httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: dropping inode keyed locks in mod_dav_fs (was: Dav Locks corrupting; need some troubleshooting tools)
Date Thu, 22 Oct 2009 08:56:31 GMT
On Sun, Oct 18, 2009 at 09:50:25PM +0200, Stefan Fritsch wrote:
> On Thursday 15 October 2009, Dick Davies wrote:
> > In any event, does it made sense to use something other than the
> > inode as the key into the lockDB - the URI for example?
> 
> Is the performance improvement of inode keyed locking so large that it 
> is worth the hassle? If mod_dav_fs used filename keyed locking 
> entirely, there would be an easy way to make file replacement by PUT 
> atomic (see PR 39815). The current behaviour of deleting the old and 
> the new file when the PUT fails is really bad.

I believe the intent of using inode/device-number keyed locks was to 
ensure that the lock database is independent of the mount point - i.e. 
you could move it around in the filesystem and it'd still work.

(It would also allow mod_dav to support BIND via hard links since locks 
would be associated correctly with a resource rather than a URI path, 
but that is not really a consideration here)

I certainly agree that the delete-on-PUT-failure behaviour is bad; I 
think the correct behaviour would be to do the deletion only if the 
resource is newly created by the PUT.

Regards, Joe

Mime
View raw message