From 672af49c889f5eaf31c745ad3e82f0c964f4921b Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 22 Aug 2008 17:40:41 +0000 Subject: [PATCH] b=15899 i=nathan i=adilger add OST pools --- lustre/mds/handler.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 63e7ead..02c83b8 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -470,7 +470,7 @@ static int mds_destroy_export(struct obd_export *export) mfd->mfd_dentry->d_inode->i_ino); rc = mds_get_md(obd, mfd->mfd_dentry->d_inode, lmm, - &lmm_size, 1, 0); + &lmm_size, 1, 0, 0); if (rc < 0) CWARN("mds_get_md failure, rc=%d\n", rc); else @@ -576,7 +576,8 @@ static int mds_getstatus(struct ptlrpc_request *req) * The EA size is also returned on success, and -ve errno on failure. * If there is no EA then 0 is returned. */ int mds_get_md(struct obd_device *obd, struct inode *inode, void *md, - int *size, int lock, int flags) + int *size, int lock, int flags, + __u64 connect_flags) { int rc = 0; int lmm_size = 0; @@ -593,7 +594,8 @@ int mds_get_md(struct obd_device *obd, struct inode *inode, void *md, rc, inode->i_ino); } else if (rc > 0) { lmm_size = rc; - rc = mds_convert_lov_ea(obd, inode, md, lmm_size); + rc = mds_convert_lov_ea(obd, inode, md, lmm_size, + connect_flags); if (rc == 0) { *size = lmm_size; @@ -614,7 +616,8 @@ int mds_get_md(struct obd_device *obd, struct inode *inode, void *md, /* Call with lock=1 if you want mds_pack_md to take the i_mutex. * Call with lock=0 if the caller has already taken the i_mutex. */ int mds_pack_md(struct obd_device *obd, struct lustre_msg *msg, int offset, - struct mds_body *body, struct inode *inode, int lock, int flags) + struct mds_body *body, struct inode *inode, int lock, int flags, + __u64 connect_flags) { struct mds_obd *mds = &obd->u.mds; void *lmm; @@ -645,7 +648,8 @@ int mds_pack_md(struct obd_device *obd, struct lustre_msg *msg, int offset, // RETURN(-EINVAL); } - rc = mds_get_md(obd, inode, lmm, &lmm_size, lock, flags); + rc = mds_get_md(obd, inode, lmm, &lmm_size, lock, flags, + connect_flags); if (rc > 0) { if (S_ISDIR(inode->i_mode)) body->valid |= OBD_MD_FLDIREA; @@ -732,7 +736,8 @@ static int mds_getattr_internal(struct obd_device *obd, struct dentry *dentry, flags = MDS_GETATTR; rc = mds_pack_md(obd, req->rq_repmsg, reply_off, body, - inode, 1, flags); + inode, 1, flags, + req->rq_export->exp_connect_flags); /* If we have LOV EA data, the OST holds size, atime, mtime */ if (!(body->valid & OBD_MD_FLEASIZE) && @@ -829,7 +834,7 @@ static int mds_getattr_pack_msg(struct ptlrpc_request *req, struct inode *inode, rc, inode->i_ino); if ((rc == 0) && (lustre_msg_get_opc(req->rq_reqmsg) == MDS_GETATTR) && ((S_ISDIR(inode->i_mode) && (body->valid & OBD_MD_FLDIREA)))) - rc = sizeof(struct lov_mds_md); + rc = sizeof(struct lov_mds_md_v3); if (rc < 0) { if (rc != -ENODATA) { CERROR("error getting inode %lu MD: rc = %d\n", @@ -1989,7 +1994,7 @@ static int mds_setup(struct obd_device *obd, obd_count len, void *buf) sema_init(&mds->mds_epoch_sem, 1); spin_lock_init(&mds->mds_transno_lock); - mds->mds_max_mdsize = sizeof(struct lov_mds_md); + mds->mds_max_mdsize = sizeof(struct lov_mds_md_v3); mds->mds_max_cookiesize = sizeof(struct llog_cookie); mds->mds_atime_diff = MAX_ATIME_DIFF; mds->mds_evict_ost_nids = 1; @@ -2024,7 +2029,7 @@ static int mds_setup(struct obd_device *obd, obd_count len, void *buf) if (obd->obd_proc_exports_entry) lprocfs_add_simple(obd->obd_proc_exports_entry, "clear", lprocfs_nid_stats_clear_read, - lprocfs_nid_stats_clear_write, obd); + lprocfs_nid_stats_clear_write, obd, NULL); if (lcfg->lcfg_bufcount >= 4 && LUSTRE_CFG_BUFLEN(lcfg, 3) > 0) { class_uuid_t uuid; -- 1.8.3.1