From 9ac37e061515ed6a3efcc8aca87ce71f6fff2a18 Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Wed, 6 Feb 2013 19:05:08 -0600 Subject: [PATCH] LU-2689 interop: use stripe md in ll_update_inode() When connected to servers that do not support LL_SBI_LAYOUT_LOCK, if stripe md is available in ll_inode_update() then use it. Signed-off-by: John L. Hammond Change-Id: I949a0129c3fc92c5434288df0549a54ccd440f97 Reviewed-on: http://review.whamcloud.com/5289 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/lclient/lcommon_cl.c | 5 ++++- lustre/llite/llite_lib.c | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lustre/lclient/lcommon_cl.c b/lustre/lclient/lcommon_cl.c index c9ba748..41ebae9 100644 --- a/lustre/lclient/lcommon_cl.c +++ b/lustre/lclient/lcommon_cl.c @@ -1200,7 +1200,10 @@ int cl_file_inode_init(struct inode *inode, struct lustre_md *md) lu_object_ref_add(&clob->co_lu, "inode", inode); } else result = PTR_ERR(clob); - } + } else { + result = cl_conf_set(env, lli->lli_clob, &conf); + } + cl_env_put(env, &refcheck); if (result != 0) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 0e343f8..6e91365 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -1697,6 +1697,10 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) LASSERT ((lsm != NULL) == ((body->valid & OBD_MD_FLEASIZE) != 0)); if (lsm != NULL) { + if (!lli->lli_has_smd && + !(sbi->ll_flags & LL_SBI_LAYOUT_LOCK)) + cl_file_inode_init(inode, md); + lli->lli_maxbytes = lsm->lsm_maxbytes; if (lli->lli_maxbytes > MAX_LFS_FILESIZE) lli->lli_maxbytes = MAX_LFS_FILESIZE; -- 1.8.3.1