Subject: RE: Move and Delete (was: bind draft issues)

From: Jason Crawford <[email-masked]>
Date: Tue, 4 Mar 2003 12:05:20 -0500

> > Just for interests sake, how many examples are there of
> > repositories that do support multiple bindings to a collection
> > but cannot support atomic DELETE/MOVE?
> The Unix file system?

Sort of.  On most (all?) Unix file systems you can't create a
hard link to a directory, but you can create a soft/symbolic link.
In essence, all directories have one hard link and zero or more
symbolic links to them.  The symbolic link has no referential
integrity, but that's probably not a major issue for a WebDAV
server since the link can be traversed to confirm that the referee
still exists.  (See caveat below.)

To simulate BIND support one can use symbolic links.  In that
case the action to take when doing a DELETE/UNBIND is
fairly easy if the binding is implemented as a symbolic link, but
not as easy if it's a hard link.  If breaking a hard link, there
are a number of options.  I believe you can't just delete the
subdirectory without deleting it's children.   But you can move the
directory to another location on the same file system.   It can be
moved out of the namespace or it
can be moved to replace a symbolic link to the collection.

Whether it's a symbolic link or a
hard link being removed, you still need to do a fix up of symbolic
links in to the subtree being removed.  That obviously is not
atomic, but at the WebDAV level you can block or remap access
until that's completed.

Or... you can just reject BIND requests to directories.  :-)

But more to the point of the discussion, there is nothing that will cause
the file based Unix server to need to return a status code indicating that
only
"part" of the DELETE/UNBIND operation occured.

J.

---

From: "Julian Reschke" <[email-masked]>
Date: Tue, 4 Mar 2003 18:27:08 +0100

> From: [email-masked]
> [mailto:[email-masked]]On Behalf Of Jason Crawford
> Sent: Tuesday, March 04, 2003 6:05 PM
> To: Julian Reschke
> Cc: Clemm, Geoff; 'WebDAV'
> Subject: RE: Move and Delete (was: bind draft issues)
>
>
>
>
>
>

It may depend on the implementation and your permissions.

> symbolic links to them.  The symbolic link has no referential

Wrong.

Any directory has two hard links (it's entry in the parent, and the "."
entry as internal member). In addition, it gets hard links for each internal
member that is a directory (through it's ".." entry). You can check this
easily using ls.

> To simulate BIND support one can use symbolic links.  In that

I'd be surprised if you could. If you delete a directory, how do you detect
that there are symlinks left pointing to it?

> ,...

Why do I need to fix up symlinks? It's their nature that they are weak
links. I'd be surprised if they track another resource automatically.

> until that's completed.s

I may be able to block that at the WebDAV level, but the WebDAV code may not
be able to block other access types (such as filesystem access).

> Or... you can just reject BIND requests to directories.  :-)

Even if I'd do that, the current wording of the BIND draft does not allow me
to keep my current RFC2518-compliant DELETE implementation. I feel this is a
problem.

only
> "part" of the DELETE/UNBIND operation occured.

Because rmdir() only applies to empty directories and therefore doesn't need
to consider this issue.

Julian

--
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760