Sam Lang wrote:
On Jan 20, 2006, at 1:50 PM, Phil Carns wrote:
pvfs2-remove-dirent-count.patch:
=======================
This patch is straightforward; it simply removes the dirent_count
check from the sys-remove path. The main problem with this check is
that it relies on attributes which may have come from the attribute
cache and doesn't give the server a chance to overrule the decision.
Hm...I think I added that check based on someone's suggestion...
(http://www.beowulf-underground.org/pipermail/pvfs2-developers/2005-
December/001713.html) :-).
That should teach you a lesson about mailing list suggestions :) I
didn't realize until later in the thread that once the rmdirent is done,
you may as well let the server take sole responsibility for checking if
the directory is empty. The client side check is only helpful if you do
it before the rmdirent (as you say below) and make sure the attributes
are freshly retrieved from the server.
For the time being, it looks like the check should be removed altogether
until they can be done before the rmdirent. The recursive remove
problem is too easy to trigger.
FWIW, The conclusion we came to from that previous email thread was
that the name lookup and getattr should occur at the beginning of the
state machine before rmdirent. I just haven't implemented it because
it would mean changing the lookup state machine around in ways similar
to how getattr is now, and I wanted to wait until we have a pushable
state stack in place (hopefully soon!).
I guess I can commit this for now, but wouldn't it be easier to just
remove the check instead of adding the extra argument to
GETATTR_STATE_FILL for the special case? or is that just for the
rename bug?
I think that rename has a particular problem that doesn't exist in the
remove case. I can't pull up the mailing list search engine at the
moment, but I think there may have been a discussion or explanation when
I submitted a patch named safer-rename.patch last summer.
-Phil
_______________________________________________
Pvfs2-developers mailing list
Pvfs2-developers@beowulf-underground.org
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers