Whamcloud - gitweb
LU-3240 llite: Do not send parent dir fid in getattr by fid 10/7910/3
authorOleg Drokin <oleg.drokin@intel.com>
Thu, 10 Oct 2013 00:44:10 +0000 (20:44 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 11 Oct 2013 22:08:46 +0000 (22:08 +0000)
Sending getattr by fid in this case is pointless, as the parent
might havelong changed and we have no control over it, but it's
irrelevant anyway, since we already have the child fid.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Change-Id: I8ea05e931cd85c126274b024a440137c309e5eb7
Reviewed-on: http://review.whamcloud.com/7910
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/llite/dir.c
lustre/llite/file.c
lustre/mdt/mdt_handler.c

index 04cf9d2..9a4c11c 100644 (file)
@@ -360,7 +360,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,
                struct ptlrpc_request *request;
                struct md_op_data *op_data;
 
-               op_data = ll_prep_md_op_data(NULL, dir, NULL, NULL, 0, 0,
+               op_data = ll_prep_md_op_data(NULL, dir, dir, NULL, 0, 0,
                LUSTRE_OPC_ANY, NULL);
                if (IS_ERR(op_data))
                        return (void *)op_data;
index 7fb9a5e..ce5fb5a 100644 (file)
@@ -3099,7 +3099,7 @@ int __ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it,
                         oit.it_op = IT_LOOKUP;
 
                 /* Call getattr by fid, so do not provide name at all. */
-                op_data = ll_prep_md_op_data(NULL, dentry->d_parent->d_inode,
+                op_data = ll_prep_md_op_data(NULL, dentry->d_inode,
                                              dentry->d_inode, NULL, 0, 0,
                                              LUSTRE_OPC_ANY, NULL);
                 if (IS_ERR(op_data))
index 5de7d78..757bae3 100644 (file)
@@ -1255,7 +1255,7 @@ static int mdt_getattr_name_lock(struct mdt_thread_info *info,
         }
         mdt_set_disposition(info, ldlm_rep, DISP_LOOKUP_EXECD);
 
-       if (unlikely(!mdt_object_exists(parent))) {
+       if (unlikely(!mdt_object_exists(parent)) && lname) {
                LU_OBJECT_DEBUG(D_INODE, info->mti_env,
                                &parent->mot_obj,
                                "Parent doesn't exist!\n");