[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

remove - bug ???

From: Vineet Chadha
Subject: remove - bug ???
Date: Thu, 9 Mar 2006 13:33:25 -0500

** <address@hidden>Modern operating system put the in-core inode into
free list and
sometimes re-allocates inode immediately to NEXT creation of file system
object. remove UTILITY heavily works on assumption that
directory-to-be-deleted is of single thread and not being modified by
other user or process. Specifically, I will give you as example of my
copy-on-write implementation. i have been trying to replicate  a directory
hierarchy from main server to a dummy server. Now if I issue "rm -rf",
it starts replicating file ( untill it is already done so) in
shadow server and subsequently delete it and update state of corresponding
dir in a hash table. Point is that during the process of remove, directory
strcuture is also being changed (as being replicated). Since, OS is
inodes, almost most of time, remove fails on circular directory structure
as OS has reallocated the inode to newly replicated file object in same
directory hierarchy.
I confirmed this phenomenon ( though not conistently ) through running two
scripts (one creating 10000 dir hierachy and other deleting it). I tried
nearly 10 times and it failed 2 times (even though it is completely
different dir).
circular directory hierarchy depends on comparison of inode stored in
change dir (stored with power of two)  and  current inode. I  think remove
be modified for concurrent user access to directory.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]