diff options
author | Sage Weil <sage@newdream.net> | 2011-03-15 18:53:40 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-11-03 12:23:49 -0400 |
commit | b58dc4100b9190f2cb437f1f67ffcb9f9acc4923 (patch) | |
tree | 5956065af3d9b126b8ae4a37551837c389f12702 /fs/ceph/super.h | |
parent | 3f8ddb032afa729d4bad1bf2965d3ec068de6b72 (diff) |
ceph: clear parent D_COMPLETE flag when on dentry prune
When the VFS prunes a dentry from the cache, clear the D_COMPLETE flag
on the parent dentry. Do this for the live and snapshotted namespaces. Do
not bother for the .snap dir contents, since we do not cache that.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index b01442aaf278..98e60693c9a1 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -203,6 +203,7 @@ struct ceph_inode_xattr { | |||
203 | * Ceph dentry state | 203 | * Ceph dentry state |
204 | */ | 204 | */ |
205 | struct ceph_dentry_info { | 205 | struct ceph_dentry_info { |
206 | unsigned long flags; | ||
206 | struct ceph_mds_session *lease_session; | 207 | struct ceph_mds_session *lease_session; |
207 | u32 lease_gen, lease_shared_gen; | 208 | u32 lease_gen, lease_shared_gen; |
208 | u32 lease_seq; | 209 | u32 lease_seq; |
@@ -213,6 +214,18 @@ struct ceph_dentry_info { | |||
213 | u64 offset; | 214 | u64 offset; |
214 | }; | 215 | }; |
215 | 216 | ||
217 | /* | ||
218 | * dentry flags | ||
219 | * | ||
220 | * The locking for D_COMPLETE is a bit odd: | ||
221 | * - we can clear it at almost any time (see ceph_d_prune) | ||
222 | * - it is only meaningful if: | ||
223 | * - we hold dir inode i_lock | ||
224 | * - we hold dir FILE_SHARED caps | ||
225 | * - the dentry D_COMPLETE is set | ||
226 | */ | ||
227 | #define CEPH_D_COMPLETE 1 /* if set, d_u.d_subdirs is complete directory */ | ||
228 | |||
216 | struct ceph_inode_xattrs_info { | 229 | struct ceph_inode_xattrs_info { |
217 | /* | 230 | /* |
218 | * (still encoded) xattr blob. we avoid the overhead of parsing | 231 | * (still encoded) xattr blob. we avoid the overhead of parsing |