diff options
author | Sage Weil <sage@newdream.net> | 2010-04-16 15:58:02 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-17 18:25:27 -0400 |
commit | 1b7facc41b42c2ab904b2f88b64b1f8ca0ca6cb7 (patch) | |
tree | 43203661dfe2675979e32a477d598d0f7559c8ee /fs/ceph/inode.c | |
parent | e8a7498715181ece36130335536e13733a5c3187 (diff) |
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: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r-- | fs/ceph/inode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 49a0935c4390..aa22a0bce52f 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -675,7 +675,8 @@ static int fill_inode(struct inode *inode, | |||
675 | /* set dir completion flag? */ | 675 | /* set dir completion flag? */ |
676 | if (ci->i_files == 0 && ci->i_subdirs == 0 && | 676 | if (ci->i_files == 0 && ci->i_subdirs == 0 && |
677 | ceph_snap(inode) == CEPH_NOSNAP && | 677 | ceph_snap(inode) == CEPH_NOSNAP && |
678 | (le32_to_cpu(info->cap.caps) & CEPH_CAP_FILE_SHARED)) { | 678 | (le32_to_cpu(info->cap.caps) & CEPH_CAP_FILE_SHARED) && |
679 | (ci->i_ceph_flags & CEPH_I_COMPLETE) == 0) { | ||
679 | dout(" marking %p complete (empty)\n", inode); | 680 | dout(" marking %p complete (empty)\n", inode); |
680 | ci->i_ceph_flags |= CEPH_I_COMPLETE; | 681 | ci->i_ceph_flags |= CEPH_I_COMPLETE; |
681 | ci->i_max_offset = 2; | 682 | ci->i_max_offset = 2; |