X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fquota%2Fqsd_config.c;h=507786124343193825b97d5fd2bfaa77be6e5d33;hb=c1d0a355a6a64ec97c9f56c38ba036e5e50cd8c4;hp=3eb49c98e3ecbaabe705e01f020891a9a92b1220;hpb=6d9df3b2c0d54b16d00b6e419c7bb958e6b54844;p=fs%2Flustre-release.git diff --git a/lustre/quota/qsd_config.c b/lustre/quota/qsd_config.c index 3eb49c9..5077861 100644 --- a/lustre/quota/qsd_config.c +++ b/lustre/quota/qsd_config.c @@ -122,7 +122,7 @@ out: int qsd_config(char *valstr, char *fsname, int pool) { struct qsd_fsinfo *qfs; - int rc, enabled = 0; + int rc, enabled = 0, old_enabled = 0; bool reint = false; ENTRY; @@ -148,6 +148,7 @@ int qsd_config(char *valstr, char *fsname, int pool) if ((qfs->qfs_enabled[pool - LQUOTA_FIRST_RES] & enabled) != enabled) reint = true; + old_enabled = qfs->qfs_enabled[pool - LQUOTA_FIRST_RES]; qfs->qfs_enabled[pool - LQUOTA_FIRST_RES] = enabled; /* trigger reintegration for all qsd */ @@ -170,6 +171,12 @@ int qsd_config(char *valstr, char *fsname, int pool) for (type = USRQUOTA; type < LL_MAXQUOTAS; type++) { qqi = qsd->qsd_type_array[type]; + /* only trigger reintegration if this + * type of quota is not enabled before */ + if ((old_enabled & 1 << type) || + !(enabled & 1 << type)) + continue; + if (qqi->qqi_acct_failed) { LCONSOLE_ERROR("%s: can't enable quota " "enforcement since space "