diff options
author | Tiger Yang <tiger.yang@oracle.com> | 2007-03-20 19:01:38 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-04-26 17:39:48 -0400 |
commit | 500086300e6dc5308a7328990bd50d17e075162b (patch) | |
tree | 4083cda09445c260c2cc2ac1d0f68c05ad2b958e /fs/ocfs2/ocfs2_lockid.h | |
parent | a9f5f70739363ccca2e771c274c4f015c5fb7a88 (diff) |
ocfs2: Remove delete inode vote
Ocfs2 currently does cluster-wide node messaging to check the open state of
an inode during delete. This patch removes that mechanism in favor of an
inode cluster lock which is taken at shared read when an inode is first read
and dropped in clear_inode(). This allows a deleting node to test the
liveness of an inode by attempting to take an exclusive lock.
Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/ocfs2_lockid.h')
-rw-r--r-- | fs/ocfs2/ocfs2_lockid.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2_lockid.h b/fs/ocfs2/ocfs2_lockid.h index 4d5d5655c185..4ca02b1c38ac 100644 --- a/fs/ocfs2/ocfs2_lockid.h +++ b/fs/ocfs2/ocfs2_lockid.h | |||
@@ -44,6 +44,7 @@ enum ocfs2_lock_type { | |||
44 | OCFS2_LOCK_TYPE_RENAME, | 44 | OCFS2_LOCK_TYPE_RENAME, |
45 | OCFS2_LOCK_TYPE_RW, | 45 | OCFS2_LOCK_TYPE_RW, |
46 | OCFS2_LOCK_TYPE_DENTRY, | 46 | OCFS2_LOCK_TYPE_DENTRY, |
47 | OCFS2_LOCK_TYPE_OPEN, | ||
47 | OCFS2_NUM_LOCK_TYPES | 48 | OCFS2_NUM_LOCK_TYPES |
48 | }; | 49 | }; |
49 | 50 | ||
@@ -69,6 +70,9 @@ static inline char ocfs2_lock_type_char(enum ocfs2_lock_type type) | |||
69 | case OCFS2_LOCK_TYPE_DENTRY: | 70 | case OCFS2_LOCK_TYPE_DENTRY: |
70 | c = 'N'; | 71 | c = 'N'; |
71 | break; | 72 | break; |
73 | case OCFS2_LOCK_TYPE_OPEN: | ||
74 | c = 'O'; | ||
75 | break; | ||
72 | default: | 76 | default: |
73 | c = '\0'; | 77 | c = '\0'; |
74 | } | 78 | } |
@@ -85,6 +89,7 @@ static char *ocfs2_lock_type_strings[] = { | |||
85 | * important job it does, anyway. */ | 89 | * important job it does, anyway. */ |
86 | [OCFS2_LOCK_TYPE_RW] = "Write/Read", | 90 | [OCFS2_LOCK_TYPE_RW] = "Write/Read", |
87 | [OCFS2_LOCK_TYPE_DENTRY] = "Dentry", | 91 | [OCFS2_LOCK_TYPE_DENTRY] = "Dentry", |
92 | [OCFS2_LOCK_TYPE_OPEN] = "Open", | ||
88 | }; | 93 | }; |
89 | 94 | ||
90 | static inline const char *ocfs2_lock_type_string(enum ocfs2_lock_type type) | 95 | static inline const char *ocfs2_lock_type_string(enum ocfs2_lock_type type) |