From 3aa4a85d37563db1e87b7da9e621bc33ffad0108 Mon Sep 17 00:00:00 2001 From: Johann Lombardi Date: Sat, 6 Oct 2012 00:14:06 +0200 Subject: [PATCH 1/1] LU-1842 quota: don't setup qsd for standalone MGS Only set up the qsd instance if the associated target is either a MDT or a OST. We typically have no interest in setting up a QSD instance on a standalone MGS. Signed-off-by: Johann Lombardi Change-Id: I0facb08feef0b36f141b749d7be538cbde5f1114 Reviewed-on: http://review.whamcloud.com/4203 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Niu Yawei Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin --- lustre/quota/qsd_lib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lustre/quota/qsd_lib.c b/lustre/quota/qsd_lib.c index c1ba0c3..277791b 100644 --- a/lustre/quota/qsd_lib.c +++ b/lustre/quota/qsd_lib.c @@ -450,9 +450,14 @@ struct qsd_instance *qsd_init(const struct lu_env *env, char *svname, { struct qsd_thread_info *qti = qsd_info(env); struct qsd_instance *qsd; - int rc; + int rc, type, idx; ENTRY; + /* only configure qsd for MDT & OST */ + type = server_name2index(svname, &idx, NULL); + if (type != LDD_F_SV_TYPE_MDT && type != LDD_F_SV_TYPE_OST) + RETURN(NULL); + /* allocate qsd instance */ OBD_ALLOC_PTR(qsd); if (qsd == NULL) -- 1.8.3.1