-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011, 2012, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Author: Niu YaWei <niu@clusterfs.com>
*/
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
#define DEBUG_SUBSYSTEM S_LQUOTA
#include <linux/version.h>
CFS_MODULE_PARM(hash_lqs_cur_bits, "i", int, 0444,
"the current bits of lqs hash");
-#ifdef HAVE_QUOTA_SUPPORT
-
static cfs_hash_ops_t lqs_hash_ops;
unsigned long default_bunit_sz = 128 * 1024 * 1024; /* 128M bytes */
limit_org = limit;
/* when a releasing quota req is sent, before it returned
limit is assigned a small value. limit will overflow */
- if (limit + record < 0)
+ if (record < 0)
usage -= record;
else
limit += record;
struct lustre_qunit *qunit, *find_qunit;
int cycle = 1;
- OBD_SLAB_ALLOC(qunit, qunit_cachep, CFS_ALLOC_IO, sizeof(*qunit));
+ OBD_SLAB_ALLOC_PTR(qunit, qunit_cachep);
if (qunit == NULL) {
CERROR("locating %sunit failed for %sid %u\n",
isblk ? "b" : "i", oqctl->qc_type ? "g" : "u",
aa->aa_qunit = qunit;
req->rq_interpret_reply = dqacq_interpret;
- ptlrpcd_add_req(req, PSCOPE_OTHER);
+ ptlrpcd_add_req(req, PDL_POLICY_LOCAL, -1);
QDATA_DEBUG(qdata, "%s scheduled.\n",
opc == QUOTA_DQACQ ? "DQACQ" : "DQREL");
.hs_put_locked = lqs_put_locked,
.hs_exit = lqs_exit
};
-#endif /* HAVE_QUOTA_SUPPORT */