linux/fs/ceph
Yan, Zheng 600d8cbcd0 ceph: clear directory's completeness when creating file
commit 0a8a70f96f upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07 10:28:20 -07:00
..
Kconfig ceph: add acl for cephfs 2013-12-31 20:32:01 +02:00
Makefile ceph: add acl for cephfs 2013-12-31 20:32:01 +02:00
acl.c ceph: make ceph_forget_all_cached_acls() static inline 2014-02-17 12:37:12 -08:00
addr.c ceph: fix dout() compile warnings in ceph_filemap_fault() 2014-01-28 09:57:06 -08:00
cache.c Merge branch 'for-linus-bugs' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2013-11-26 18:02:46 -08:00
cache.h ceph fscache: Introduce a routine for uncaching single no data page from fscache 2013-12-31 20:32:02 +02:00
caps.c ceph: add imported caps when handling cap export message 2014-01-21 16:30:31 +08:00
ceph_frag.c
debugfs.c libceph: delay debugfs initialization until we learn global_id 2012-08-20 10:03:15 -07:00
dir.c ceph: clear directory's completeness when creating file 2014-06-07 10:28:20 -07:00
export.c fs: encode_fh: return FILEID_INVALID if invalid fid_type 2013-02-26 02:46:10 -05:00
file.c ceph: add missing init_acl() for mkdir() and atomic_open() 2014-02-17 12:37:11 -08:00
inode.c ceph: clear directory's completeness when creating file 2014-06-07 10:28:20 -07:00
ioctl.c libceph: replace ceph_calc_ceph_pg() with ceph_oloc_oid_to_pg() 2014-01-27 23:57:32 +02:00
ioctl.h ceph: fully initialize new layout 2012-05-16 14:28:27 -05:00
locks.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2013-07-09 12:39:10 -07:00
mds_client.c ceph: add open export target session helper 2014-01-21 16:30:30 +08:00
mds_client.h ceph: add open export target session helper 2014-01-21 16:30:30 +08:00
mdsmap.c ceph: tidy ceph_mdsmap_decode() a little 2013-07-01 09:52:02 -07:00
snap.c ceph: use ceph_create_snap_context() 2013-05-01 21:20:09 -07:00
strings.c ceph: handle session flush message 2014-01-21 13:29:33 +08:00
super.c ceph: add acl, noacl options for cephfs mount 2014-02-17 12:37:12 -08:00
super.h ceph: clear directory's completeness when creating file 2014-06-07 10:28:20 -07:00
xattr.c ceph: fix ceph_removexattr() 2014-02-17 12:37:10 -08:00