aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-11-03 12:23:36 -0400
committerSage Weil <sage@newdream.net>2011-11-06 00:10:10 -0400
commitc6ffe10015f4e6fba8a915318b319c43aed1836f (patch)
treedd39730aeb6d00713ca27a1bf34b116d31479151 /fs/ceph/caps.c
parentb58dc4100b9190f2cb437f1f67ffcb9f9acc4923 (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/caps.c')
-rw-r--r--fs/ceph/caps.c8
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,
487 ci->i_rdcache_gen++; 487 ci->i_rdcache_gen++;
488 488
489 /* 489 /*
490 * if we are newly issued FILE_SHARED, clear I_COMPLETE; we 490 * if we are newly issued FILE_SHARED, clear D_COMPLETE; we
491 * don't know what happened to this directory while we didn't 491 * don't know what happened to this directory while we didn't
492 * have the cap. 492 * have the cap.
493 */ 493 */
494 if ((issued & CEPH_CAP_FILE_SHARED) && 494 if ((issued & CEPH_CAP_FILE_SHARED) &&
495 (had & CEPH_CAP_FILE_SHARED) == 0) { 495 (had & CEPH_CAP_FILE_SHARED) == 0) {
496 ci->i_shared_gen++; 496 ci->i_shared_gen++;
497 if (S_ISDIR(ci->vfs_inode.i_mode)) { 497 if (S_ISDIR(ci->vfs_inode.i_mode))
498 dout(" marking %p NOT complete\n", &ci->vfs_inode); 498 ceph_dir_clear_complete(&ci->vfs_inode);
499 ci->i_ceph_flags &= ~CEPH_I_COMPLETE;
500 }
501 } 499 }
502} 500}
503 501