diff options
author | Anand Avati <avati@gluster.com> | 2009-10-15 19:36:47 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-10-16 05:13:01 -0700 |
commit | c8f39bea04c6021243d1ab2bcea450a0f067aabc (patch) | |
tree | fdfcc4c0bc7f852184476a274060c2144ad3c691 /xlators/features/locks/src/locks.h | |
parent | d3722f7546bdcfeed7cf3c2745c1bfafa7fa79a4 (diff) |
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 <avati@dev.gluster.com>
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
Diffstat (limited to 'xlators/features/locks/src/locks.h')
-rw-r--r-- | xlators/features/locks/src/locks.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/features/locks/src/locks.h b/xlators/features/locks/src/locks.h index 65da3a365..fe1333504 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; |