Project

General

Profile

Actions

Bug #11009

closed

fs client dcache/nodcache option doesn't do anything

Added by John Spray about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
fs/ceph
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):

Description

Documentation/filesystems/ceph.txt talks about the dcache and nodcache options, but they are actually ignored in the code.

I guess we should at least update the documentation to reflect that, perhaps also log a warning that the setting doesn't do anything if it's found?

The flag was added here:

commit a40dc6cc2e121abcbd1b22583ef5447763df510c
Author: Sage Weil <sage@newdream.net>
Date:   Tue Jan 10 09:12:55 2012 -0800

    ceph: enable/disable dentry complete flags via mount option

    Enable/disable use of the dentry dir 'complete' flag via a mount option.
    This lets the admin control whether ceph uses the dcache to satisfy
    negative lookups or readdir when it has the entire directory contents in
    its cache.

    This is purely a performance optimization; correctness is guaranteed
    whether it is enabled or not.

    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Sage Weil <sage@newdream.net>

It was removed here:

commit a8673d61ad77ddf2118599507bd40cc345e95368
Author: Yan, Zheng <zheng.z.yan@intel.com>
Date:   Mon Feb 18 16:38:14 2013 +0800

    ceph: use I_COMPLETE inode flag instead of D_COMPLETE flag

    commit c6ffe10015 moved the flag that tracks if the dcache contents
    for a directory are complete to dentry. The problem is there are
    lots of places that use ceph_dir_{set,clear,test}_complete() while
    holding i_ceph_lock. but ceph_dir_{set,clear,test}_complete() may
    sleep because they call dput().

    This patch basically reverts that commit. For ceph_d_prune(), it's
    called with both the dentry to prune and the parent dentry are
    locked. So it's safe to access the parent dentry's d_inode and
    clear I_COMPLETE flag.

    Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
    Reviewed-by: Greg Farnum <greg@inktank.com>
    Reviewed-by: Sage Weil <sage@inktank.com>

Actions #2

Updated by Zheng Yan about 9 years ago

  • Status changed from 7 to Resolved
Actions

Also available in: Atom PDF