aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2014-04-14 13:13:02 +0800
committerSage Weil <sage@inktank.com>2014-04-28 12:54:44 -0700
commit0a8a70f96fe1bd3e07c15bb86fd247e76102398a (patch)
tree0d6f728345f3f4efa33896aab71dd24f611af011 /fs/ceph/super.h
parentlibceph: fix non-default values check in apply_primary_affinity() (diff)
downloadlinux-dev-0a8a70f96fe1bd3e07c15bb86fd247e76102398a.tar.xz
linux-dev-0a8a70f96fe1bd3e07c15bb86fd247e76102398a.zip
ceph: clear directory's completeness when creating file
When creating a file, ceph_set_dentry_offset() puts the new dentry at the end of directory's d_subdirs, then set the dentry's offset based on directory's max offset. The offset does not reflect the real postion of the dentry in directory. Later readdir reply from MDS may change the dentry's position/offset. This inconsistency can cause missing/duplicate entries in readdir result if readdir is partly satisfied by dcache_readdir(). The fix is clear directory's completeness after creating/renaming file. It prevents later readdir from using dcache_readdir(). Fixes: http://tracker.ceph.com/issues/8025 Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 7866cd05a6bb..ead05cc1f447 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -266,7 +266,6 @@ struct ceph_inode_info {
struct timespec i_rctime;
u64 i_rbytes, i_rfiles, i_rsubdirs;
u64 i_files, i_subdirs;
- u64 i_max_offset; /* largest readdir offset, set with complete dir */
struct rb_root i_fragtree;
struct mutex i_fragtree_mutex;