Commit 1b7facc4 authored by Sage Weil's avatar Sage Weil

ceph: don't clobber i_max_offset on already complete dir

This can screw up offsets assigned to new dentries and break dcache
readdir results.
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent e8a74987
...@@ -675,7 +675,8 @@ static int fill_inode(struct inode *inode, ...@@ -675,7 +675,8 @@ static int fill_inode(struct inode *inode,
/* set dir completion flag? */ /* set dir completion flag? */
if (ci->i_files == 0 && ci->i_subdirs == 0 && if (ci->i_files == 0 && ci->i_subdirs == 0 &&
ceph_snap(inode) == CEPH_NOSNAP && ceph_snap(inode) == CEPH_NOSNAP &&
(le32_to_cpu(info->cap.caps) & CEPH_CAP_FILE_SHARED)) { (le32_to_cpu(info->cap.caps) & CEPH_CAP_FILE_SHARED) &&
(ci->i_ceph_flags & CEPH_I_COMPLETE) == 0) {
dout(" marking %p complete (empty)\n", inode); dout(" marking %p complete (empty)\n", inode);
ci->i_ceph_flags |= CEPH_I_COMPLETE; ci->i_ceph_flags |= CEPH_I_COMPLETE;
ci->i_max_offset = 2; ci->i_max_offset = 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment