[LU-8891] disabling statahead changes dentry revalidation behavior Created: 01/Dec/16  Updated: 13/Jun/17  Resolved: 13/Jun/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.9.0
Fix Version/s: Lustre 2.10.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: Steve Guminski (Inactive)
Resolution: Fixed Votes: 0
Labels: llite

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In ll_revalidate_dentry() the test for LOOKUP_RCU in lookup_flags should probably go before the dentry_may_statahead() test:

static int ll_revalidate_dentry(struct dentry *dentry,
                                unsigned int lookup_flags)
{
        struct inode *dir = dentry->d_parent->d_inode;

        /* If this is intermediate component path lookup and we were able to get
         * to this dentry, then its lock has not been revoked and the
         * path component is valid. */
        if (lookup_flags & (LOOKUP_CONTINUE | LOOKUP_PARENT))
                return 1;

        /* Symlink - always valid as long as the dentry was found */
#ifdef HAVE_IOP_GET_LINK
        if (dentry->d_inode && dentry->d_inode->i_op->get_link)
#else
        if (dentry->d_inode && dentry->d_inode->i_op->follow_link)
#endif
                return 1;

        /*
         * VFS warns us that this is the second go around and previous
         * operation failed (most likely open|creat), so this time
         * we better talk to the server via the lookup path by name,
         * not by fid.
         */
        if (lookup_flags & LOOKUP_REVAL)
                return 0;

        if (!dentry_may_statahead(dir, dentry))
                return 1;

#ifndef HAVE_DCACHE_LOCK
        if (lookup_flags & LOOKUP_RCU)
                return -ECHILD;
#endif

        ll_statahead(dir, &dentry, dentry->d_inode == NULL);
        return 1;
}


 Comments   
Comment by Gerrit Updater [ 07/Dec/16 ]

Steve Guminski (stephenx.guminski@intel.com) uploaded a new patch: https://review.whamcloud.com/24195
Subject: LU-8891 llite: Dentry revalidation checks are in wrong order
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9acb5289fbedbc14ca5eb61ccdfa4b0ce46fb256

Comment by Gerrit Updater [ 13/Jun/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/24195/
Subject: LU-8891 llite: rcu-walk check should not depend on statahead
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: d054c3d4c173a41ca7c74ebe361d6de2e7aa507a

Comment by Peter Jones [ 13/Jun/17 ]

Landed for 2.10

Generated at Sat Feb 10 02:21:26 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.