From 62f58ba5d47b4756f74c0a52d36de997405ff7ca Mon Sep 17 00:00:00 2001 From: Fan Yong Date: Mon, 28 Jan 2013 00:54:20 +0800 Subject: [PATCH] LU-2770 llite: specify ea_size for md_getattr_name 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 Change-Id: I99c8301f9b00cafdf79a6c15541f868f18e4a109 Reviewed-on: http://review.whamcloud.com/5455 Tested-by: Hudson Reviewed-by: Lai Siyao Tested-by: Maloo Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin --- lustre/llite/llite_nfs.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lustre/llite/llite_nfs.c b/lustre/llite/llite_nfs.c index 0bf7265..f231fb2 100644 --- a/lustre/llite/llite_nfs.c +++ b/lustre/llite/llite_nfs.c @@ -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); -- 1.8.3.1