Whamcloud - gitweb
LU-1842 quota: add acq/rel logic on QMT
[fs/lustre-release.git] / lustre / include / lustre_quota.h
index 345f44b..545a336 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- 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.
@@ -28,6 +26,8 @@
 /*
  * 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/
@@ -76,8 +76,6 @@ struct client_obd;
 #define toqb(x) (((x) + QUOTABLOCK_SIZE - 1) >> QUOTABLOCK_BITS)
 #endif
 
-#ifdef HAVE_QUOTA_SUPPORT
-
 #ifndef MAX_IQ_TIME
 #define MAX_IQ_TIME  604800     /* (7*24*60*60) 1 week */
 #endif
@@ -177,7 +175,7 @@ struct lustre_dquot {
         /** 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 */
@@ -420,18 +418,6 @@ struct lustre_quota_ctxt {
 
 #endif  /* !__KERNEL__ */
 
-#else
-
-#define LL_DQUOT_OFF(sb) do {} while(0)
-
-struct lustre_quota_info {
-};
-
-struct lustre_quota_ctxt {
-};
-
-#endif /* !HAVE_QUOTA_SUPPORT */
-
 /* If the (quota limit < qunit * slave count), the slave which can't
  * acquire qunit should set it's local limit as MIN_QLIMIT */
 #define MIN_QLIMIT      1