[OpenAFS] Fileserver leaks Inode hash table entry after "rmdir"

Rainer Toebbicke rtb@pclella.cern.ch
Tue, 19 Feb 2008 09:53:06 +0100


This is a multi-part message in MIME format.
--------------080108040105080202080701
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

On rmdir, the fileserver checks that the directory is empty in 
DeleteTarget. Unfortunately it forgets to IH_RELEASE the directory 
handle afterwards, which ends up clobbering up the inode hash tables 
on fileserver doing lots of rmdirs (just for the anecdote we had hash 
buckets of 90 entries and others of > 150000...).


Obvious patch attached, Bcc'ed to openafs-bugs.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rainer Toebbicke
European Laboratory for Particle Physics(CERN) - Geneva, Switzerland
Phone: +41 22 767 8985       Fax: +41 22 767 7155

--------------080108040105080202080701
Content-Type: text/plain;
 name="p_rmdir_leak"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="p_rmdir_leak"

--- openafs/src/viced/afsfileprocs.c.o4	2008-01-22 13:27:12.000000000 +0100
+++ openafs/src/viced/afsfileprocs.c	2008-02-18 17:47:38.000000000 +0100
@@ -1548,6 +1548,7 @@
 	if (IsEmpty(&childdir) != 0)
 	    return (EEXIST);
 	DZap(&childdir);
+	FidZap(&childdir);
 	(*targetptr)->delete = 1;
     } else if ((--(*targetptr)->disk.linkCount) == 0)
 	(*targetptr)->delete = 1;

--------------080108040105080202080701--