From c8f39bea04c6021243d1ab2bcea450a0f067aabc Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Thu, 15 Oct 2009 19:36:47 +0000 Subject: locks: keep ref on the inode while locks are held keeping refs on the inode while there are held locks prevents the inode from getting pruned away Signed-off-by: Anand V. Avati BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112 --- xlators/features/locks/src/locks.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/features/locks/src/locks.h') diff --git a/xlators/features/locks/src/locks.h b/xlators/features/locks/src/locks.h index 65da3a3650a..fe1333504ad 100644 --- a/xlators/features/locks/src/locks.h +++ b/xlators/features/locks/src/locks.h @@ -89,6 +89,9 @@ struct __pl_inode { struct list_head int_list; /* list of internal locks */ struct list_head rw_list; /* list of waiting r/w requests */ int mandatory; /* if mandatory locking is enabled */ + + inode_t *refkeeper; /* hold refs on an inode while locks are + held to prevent pruning */ }; typedef struct __pl_inode pl_inode_t; -- cgit