diff options
author | Sage Weil <sage@newdream.net> | 2011-11-03 20:23:36 +0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-11-06 08:10:10 +0400 |
commit | c6ffe10015f4e6fba8a915318b319c43aed1836f (patch) | |
tree | dd39730aeb6d00713ca27a1bf34b116d31479151 /fs/ceph/caps.c | |
parent | b58dc4100b9190f2cb437f1f67ffcb9f9acc4923 (diff) | |
download | linux-c6ffe10015f4e6fba8a915318b319c43aed1836f.tar.xz |
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/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 15b21e35078a..0f327c6c9679 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -487,17 +487,15 @@ static void __check_cap_issue(struct ceph_inode_info *ci, struct ceph_cap *cap, ci->i_rdcache_gen++; /* - * if we are newly issued FILE_SHARED, clear I_COMPLETE; we + * if we are newly issued FILE_SHARED, clear D_COMPLETE; we * don't know what happened to this directory while we didn't * have the cap. */ if ((issued & CEPH_CAP_FILE_SHARED) && (had & CEPH_CAP_FILE_SHARED) == 0) { ci->i_shared_gen++; - if (S_ISDIR(ci->vfs_inode.i_mode)) { - dout(" marking %p NOT complete\n", &ci->vfs_inode); - ci->i_ceph_flags &= ~CEPH_I_COMPLETE; - } + if (S_ISDIR(ci->vfs_inode.i_mode)) + ceph_dir_clear_complete(&ci->vfs_inode); } } |