diff options
author | Sage Weil <sage@newdream.net> | 2010-07-22 22:47:21 +0200 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-07-22 22:50:45 +0200 |
commit | a0dff78dab0ff8d78bd5c9e33c105cf1292f2282 (patch) | |
tree | 70e63198ffd47f391b804e6d8303778cf514e581 /fs | |
parent | Linux 2.6.35-rc6 (diff) | |
download | linux-a0dff78dab0ff8d78bd5c9e33c105cf1292f2282.tar.xz linux-a0dff78dab0ff8d78bd5c9e33c105cf1292f2282.zip |
ceph: avoid dcache readdir for snapdir
We should always go to the MDS for readdir on the hidden snapdir. The
set of snapshots can change at any time; the client can't trust its cache
for that.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/dir.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index f85719310db2..ea36ba9960d3 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -266,6 +266,7 @@ static int ceph_readdir(struct file *filp, void *dirent, filldir_t filldir) spin_lock(&inode->i_lock); if ((filp->f_pos == 2 || fi->dentry) && !ceph_test_opt(client, NOASYNCREADDIR) && + ceph_snap(inode) != CEPH_SNAPDIR && (ci->i_ceph_flags & CEPH_I_COMPLETE) && __ceph_caps_issued_mask(ci, CEPH_CAP_FILE_SHARED, 1)) { err = __dcache_readdir(filp, dirent, filldir); |