diff options
author | Tao Ma <tao.ma@oracle.com> | 2009-08-17 23:19:58 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-09-22 23:09:28 -0400 |
commit | 8dec98edfe9684ce00b580a09dde3dcd21ee785b (patch) | |
tree | 3002e990974163a09ea6d427d7cf775aaca7acca /fs/ocfs2/refcounttree.h | |
parent | a433848132d8cdfb8173745b922ddb919de11527 (diff) |
ocfs2: Add new refcount tree lock resource in dlmglue.
refcount tree lock resource is used to protect refcount
tree read/write among multiple nodes.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Diffstat (limited to 'fs/ocfs2/refcounttree.h')
-rw-r--r-- | fs/ocfs2/refcounttree.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/fs/ocfs2/refcounttree.h b/fs/ocfs2/refcounttree.h new file mode 100644 index 000000000000..9a3695cdbb53 --- /dev/null +++ b/fs/ocfs2/refcounttree.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* -*- mode: c; c-basic-offset: 8; -*- | ||
2 | * vim: noexpandtab sw=8 ts=8 sts=0: | ||
3 | * | ||
4 | * refcounttree.h | ||
5 | * | ||
6 | * Copyright (C) 2009 Oracle. All rights reserved. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public | ||
10 | * License version 2 as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef OCFS2_REFCOUNTTREE_H | ||
18 | #define OCFS2_REFCOUNTTREE_H | ||
19 | |||
20 | struct ocfs2_refcount_tree { | ||
21 | struct rb_node rf_node; | ||
22 | u64 rf_blkno; | ||
23 | u32 rf_generation; | ||
24 | struct rw_semaphore rf_sem; | ||
25 | struct ocfs2_lock_res rf_lockres; | ||
26 | struct kref rf_getcnt; | ||
27 | int rf_removed; | ||
28 | |||
29 | /* the following 4 fields are used by caching_info. */ | ||
30 | struct ocfs2_caching_info rf_ci; | ||
31 | spinlock_t rf_lock; | ||
32 | struct mutex rf_io_mutex; | ||
33 | struct super_block *rf_sb; | ||
34 | }; | ||
35 | |||
36 | #endif /* OCFS2_REFCOUNTTREE_H */ | ||