-/* -*- 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) 2012, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
/** Hash list in memory, protect by dquot_hash_lock */
cfs_list_t dq_hash;
/** Protect the data in lustre_dquot */
- cfs_semaphore_t dq_sem;
+ cfs_mutex_t dq_mutex;
/** Use count */
cfs_atomic_t dq_refcnt;
/** Pointer of quota info it belongs to */
RETURN(ret);
}
-static inline int lquota_chkdq(quota_interface_t *interface,
- struct client_obd *cli, const unsigned int qid[])
-{
- int rc;
- ENTRY;
-
- QUOTA_CHECK_OP(interface, chkdq);
- rc = QUOTA_OP(interface, chkdq)(cli, qid);
- RETURN(rc);
-}
-
-static inline int lquota_setdq(quota_interface_t *interface,
- struct client_obd *cli, const unsigned int qid[],
- obd_flag valid, obd_flag flags)
-{
- int rc;
- ENTRY;
-
- QUOTA_CHECK_OP(interface, setdq);
- rc = QUOTA_OP(interface, setdq)(cli, qid, valid, flags);
- RETURN(rc);
-}
-
-static inline int lquota_poll_check(quota_interface_t *interface,
- struct obd_export *exp,
- struct if_quotacheck *qchk)
-{
- int rc;
- ENTRY;
-
- QUOTA_CHECK_OP(interface, poll_check);
- rc = QUOTA_OP(interface, poll_check)(exp, qchk);
- RETURN(rc);
-}
-
static inline int lquota_setinfo(quota_interface_t *interface,
struct obd_device *obd,
void *data)
#endif
#ifndef __KERNEL__
-extern quota_interface_t osc_quota_interface;
-extern quota_interface_t lov_quota_interface;
-extern quota_interface_t mdc_quota_interface;
-extern quota_interface_t lmv_quota_interface;
-
#ifndef MAXQUOTAS
#define MAXQUOTAS 2
#endif
* than than full kernel source, so we provide them here for compatibility.
*/
#ifdef __KERNEL__
-# if !defined(HAVE_QUOTAIO_V1_H) && !defined(HAVE_FS_QUOTA_QUOTAIO_V1_H) && \
- !defined(HAVE_FS_QUOTAIO_V1_H)
+# if !defined(HAVE_QUOTAIO_H) && !defined(HAVE_FS_QUOTA_QUOTAIO_H) && \
+ !defined(HAVE_FS_QUOTAIO_H)
#include <linux/types.h>
#include <linux/quota.h>