@@ -4533,6 +4533,7 @@ static int ll_inode_revalidate_fini(struct inode *inode, int rc)
static int ll_inode_revalidate(struct dentry *dentry, enum ldlm_intent_flags op)
{
+ struct inode *parent;
struct inode *inode = d_inode(dentry);
struct obd_export *exp = ll_i2mdexp(inode);
struct lookup_intent oit = {
@@ -4545,9 +4546,14 @@ static int ll_inode_revalidate(struct dentry *dentry, enum ldlm_intent_flags op)
CDEBUG(D_VFSTRACE, "VFS Op:inode=" DFID "(%p),name=%pd\n",
PFID(ll_inode2fid(inode)), inode, dentry);
+ if (exp_connect_flags2(exp) & OBD_CONNECT2_GETATTR_PFID)
+ parent = dentry->d_parent->d_inode;
+ else
+ parent = inode;
+
/* Call getattr by fid, so do not provide name at all. */
- op_data = ll_prep_md_op_data(NULL, dentry->d_parent->d_inode, inode,
- NULL, 0, 0, LUSTRE_OPC_ANY, NULL);
+ op_data = ll_prep_md_op_data(NULL, parent, inode, NULL, 0, 0,
+ LUSTRE_OPC_ANY, NULL);
if (IS_ERR(op_data))
return PTR_ERR(op_data);
@@ -261,7 +261,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt)
OBD_CONNECT2_LSOM |
OBD_CONNECT2_ASYNC_DISCARD |
OBD_CONNECT2_PCC |
- OBD_CONNECT2_CRUSH;
+ OBD_CONNECT2_CRUSH |
+ OBD_CONNECT2_GETATTR_PFID;
if (sbi->ll_flags & LL_SBI_LRU_RESIZE)
data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE;
@@ -197,7 +197,10 @@ int lmv_revalidate_slaves(struct obd_export *exp,
* which is not needed here.
*/
memset(op_data, 0, sizeof(*op_data));
- op_data->op_fid1 = *pfid;
+ if (exp_connect_flags2(exp) & OBD_CONNECT2_GETATTR_PFID)
+ op_data->op_fid1 = *pfid;
+ else
+ op_data->op_fid1 = fid;
op_data->op_fid2 = fid;
tgt = lmv_tgt(lmv, lsm->lsm_md_oinfo[i].lmo_mds);