From: Johann Lombardi Date: Fri, 5 Oct 2012 22:14:06 +0000 (+0200) Subject: LU-1842 quota: don't setup qsd for standalone MGS X-Git-Tag: 2.3.53~16 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=3aa4a85d37563db1e87b7da9e621bc33ffad0108;hp=99ba95a2dc6c07a4bd3aa4148f40ae36cbcb2c99;ds=sidebyside 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 --- 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)