Commit a4d46363 authored by Sage Weil's avatar Sage Weil

ceph: disable use of dcache for readdir etc.

Ceph attempts to use the dcache to satisfy negative lookups and readdir
when the entire directory contents are in cache.  Disable this behavior
until lingering bugs in this code are shaken out; we'll re-enable these
hooks once things are fully stable.
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 9d5a09e6
...@@ -1094,42 +1094,19 @@ static int ceph_snapdir_d_revalidate(struct dentry *dentry, ...@@ -1094,42 +1094,19 @@ static int ceph_snapdir_d_revalidate(struct dentry *dentry,
/* /*
* Set/clear/test dir complete flag on the dir's dentry. * Set/clear/test dir complete flag on the dir's dentry.
*/ */
static struct dentry * __d_find_any_alias(struct inode *inode)
{
struct dentry *alias;
if (list_empty(&inode->i_dentry))
return NULL;
alias = list_first_entry(&inode->i_dentry, struct dentry, d_alias);
return alias;
}
void ceph_dir_set_complete(struct inode *inode) void ceph_dir_set_complete(struct inode *inode)
{ {
struct dentry *dentry = __d_find_any_alias(inode); /* not yet implemented */
if (dentry && ceph_dentry(dentry)) {
dout(" marking %p (%p) complete\n", inode, dentry);
set_bit(CEPH_D_COMPLETE, &ceph_dentry(dentry)->flags);
}
} }
void ceph_dir_clear_complete(struct inode *inode) void ceph_dir_clear_complete(struct inode *inode)
{ {
struct dentry *dentry = __d_find_any_alias(inode); /* not yet implemented */
if (dentry && ceph_dentry(dentry)) {
dout(" marking %p (%p) NOT complete\n", inode, dentry);
clear_bit(CEPH_D_COMPLETE, &ceph_dentry(dentry)->flags);
}
} }
bool ceph_dir_test_complete(struct inode *inode) bool ceph_dir_test_complete(struct inode *inode)
{ {
struct dentry *dentry = __d_find_any_alias(inode); /* not yet implemented */
if (dentry && ceph_dentry(dentry))
return test_bit(CEPH_D_COMPLETE, &ceph_dentry(dentry)->flags);
return false; return false;
} }
......
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