A Dimarts 17 Maig 2011 20:07:13, vÃreu escriure: > Jordi, what about the original bug you reported: > >>>- a few days ago we talked about an error when repetitive sed > >>>instructions were executed, also it happens in other processes, like > >>>mantaining list of installed files for actual packages, > >>>that is solved in ovl_rename issuing a dget for the old-dentry and > >>>parent dentries. (This code is inspired on rename.c from unionfs) > > Is this still happening? Does the debug patch make any difference? my patch adds some dget/dput operations that minimize the problem, it occurs less times, but it happens. I suppose that those extra operations add an execution delay before processing the main routine; a deduction is that locking dentries is required to synchronize a rename to not be executed until another rename operation has finished. As an example of code that looks like that of unionfs, (this is not tested) struct ovl_entry { struct dentry *__upperdentry; struct dentry *lowerdentry; + struct mutex d_mutex; union { struct { u64 version; bool opaque; }; struct rcu_head rcu; }; }; static struct ovl_entry *ovl_alloc_entry(void) { struct ovl_entry *oe; oe = kzalloc(sizeof(struct ovl_entry), GFP_KERNEL); mutex_init(&oe->d_mutex); return oe; } void ovl_lock_dentry(struct dentry *dentry) { struct ovl_entry *oe = dentry->d_fsdata; mutex_lock(&oe->d_mutex); } void ovl_unlock_dentry(struct dentry *dentry) { struct ovl_entry *oe = dentry->d_fsdata; mutex_unlock(&oe->d_mutex); } static int ovl_rename(struct inode *olddir, struct dentry *old, struct inode *newdir, struct dentry *new) { int err; ........... + ovl_lock_dentry(old); err = ovl_copy_up(old); ........... + ovl_unlock_dentry(old); return err; } consider this idea, Thanks, Jordi Pujol Live never ending Tale GNU/Linux Live forever! http://livenet.selfip.com -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html