Whamcloud - gitweb
LU-2770 llite: specify ea_size for md_getattr_name
authorFan Yong <yong.fan@whamcloud.com>
Sun, 27 Jan 2013 16:54:20 +0000 (00:54 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 20 Feb 2013 03:38:24 +0000 (22:38 -0500)
For nfs re-exported case, miss to set ea_size for md_getattr_name(),
then causes the ll_get_parent failure.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I99c8301f9b00cafdf79a6c15541f868f18e4a109
Reviewed-on: http://review.whamcloud.com/5455
Tested-by: Hudson
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/llite_nfs.c

index 0bf7265..f231fb2 100644 (file)
@@ -318,6 +318,7 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
         static char           dotdot[] = "..";
         struct md_op_data     *op_data;
         int                   rc;
+       int                   lmmsize;
         ENTRY;
 
         LASSERT(dir && S_ISDIR(dir->i_mode));
@@ -327,8 +328,12 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
         CDEBUG(D_INFO, "getting parent for (%lu,"DFID")\n",
                         dir->i_ino, PFID(ll_inode2fid(dir)));
 
-        op_data = ll_prep_md_op_data(NULL, dir, NULL, dotdot,
-                                     strlen(dotdot), 0,
+       rc = ll_get_max_mdsize(sbi, &lmmsize);
+       if (rc != 0)
+               RETURN(ERR_PTR(rc));
+
+       op_data = ll_prep_md_op_data(NULL, dir, NULL, dotdot,
+                                    strlen(dotdot), lmmsize,
                                      LUSTRE_OPC_ANY, NULL);
         if (IS_ERR(op_data))
                 RETURN((void *)op_data);