diff options
author | Sage Weil <sage@newdream.net> | 2011-11-03 12:23:36 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-11-06 00:10:10 -0400 |
commit | c6ffe10015f4e6fba8a915318b319c43aed1836f (patch) | |
tree | dd39730aeb6d00713ca27a1bf34b116d31479151 /fs/ceph/super.h | |
parent | b58dc4100b9190f2cb437f1f67ffcb9f9acc4923 (diff) |
ceph: use new D_COMPLETE dentry flag
We used to use a flag on the directory inode to track whether the dcache
contents for a directory were a complete cached copy. Switch to a dentry
flag CEPH_D_COMPLETE that is safely updated by ->d_prune().
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 98e60693c9a1..01bf189e08a9 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -264,7 +264,7 @@ struct ceph_inode_info { | |||
264 | struct timespec i_rctime; | 264 | struct timespec i_rctime; |
265 | u64 i_rbytes, i_rfiles, i_rsubdirs; | 265 | u64 i_rbytes, i_rfiles, i_rsubdirs; |
266 | u64 i_files, i_subdirs; | 266 | u64 i_files, i_subdirs; |
267 | u64 i_max_offset; /* largest readdir offset, set with I_COMPLETE */ | 267 | u64 i_max_offset; /* largest readdir offset, set with D_COMPLETE */ |
268 | 268 | ||
269 | struct rb_root i_fragtree; | 269 | struct rb_root i_fragtree; |
270 | struct mutex i_fragtree_mutex; | 270 | struct mutex i_fragtree_mutex; |
@@ -429,7 +429,6 @@ static inline struct inode *ceph_find_inode(struct super_block *sb, | |||
429 | /* | 429 | /* |
430 | * Ceph inode. | 430 | * Ceph inode. |
431 | */ | 431 | */ |
432 | #define CEPH_I_COMPLETE 1 /* we have complete directory cached */ | ||
433 | #define CEPH_I_NODELAY 4 /* do not delay cap release */ | 432 | #define CEPH_I_NODELAY 4 /* do not delay cap release */ |
434 | #define CEPH_I_FLUSH 8 /* do not delay flush of dirty metadata */ | 433 | #define CEPH_I_FLUSH 8 /* do not delay flush of dirty metadata */ |
435 | #define CEPH_I_NOFLUSH 16 /* do not flush dirty caps */ | 434 | #define CEPH_I_NOFLUSH 16 /* do not flush dirty caps */ |
@@ -487,6 +486,13 @@ static inline loff_t ceph_make_fpos(unsigned frag, unsigned off) | |||
487 | } | 486 | } |
488 | 487 | ||
489 | /* | 488 | /* |
489 | * set/clear directory D_COMPLETE flag | ||
490 | */ | ||
491 | void ceph_dir_set_complete(struct inode *inode); | ||
492 | void ceph_dir_clear_complete(struct inode *inode); | ||
493 | bool ceph_dir_test_complete(struct inode *inode); | ||
494 | |||
495 | /* | ||
490 | * caps helpers | 496 | * caps helpers |
491 | */ | 497 | */ |
492 | static inline bool __ceph_is_any_real_caps(struct ceph_inode_info *ci) | 498 | static inline bool __ceph_is_any_real_caps(struct ceph_inode_info *ci) |