* GPL HEADER END
*/
/*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2016, Intel Corporation.
* Use is subject to license terms.
*/
* Once we support quota on non-default pools, then more pools will
* be added to this hash table and pool master setup would have to be
* handled via configuration logs */
- cfs_hash_t *qmt_pool_hash;
+ struct cfs_hash *qmt_pool_hash;
/* List of pools managed by this master target */
- cfs_list_t qmt_pool_list;
+ struct list_head qmt_pool_list;
/* procfs root directory for this qmt */
- cfs_proc_dir_entry_t *qmt_proc;
+ struct proc_dir_entry *qmt_proc;
/* dedicated thread in charge of space rebalancing */
struct ptlrpc_thread qmt_reba_thread;
/* list of lqe entry which need space rebalancing */
- cfs_list_t qmt_reba_list;
+ struct list_head qmt_reba_list;
/* lock protecting rebalancing list */
spinlock_t qmt_reba_lock;
*/
struct qmt_pool_info {
/* link to qmt's pool hash */
- cfs_hlist_node_t qpi_hash;
+ struct hlist_node qpi_hash;
/* chained list of all pools managed by the same qmt */
- cfs_list_t qpi_linkage;
+ struct list_head qpi_linkage;
/* Pool key composed of pool_id | (pool_type << 16)
* Only pool ID 0 is supported for now and the pool type is either
struct lquota_entry *qpi_grace_lqe[MAXQUOTAS];
/* procfs root directory for this pool */
- cfs_proc_dir_entry_t *qpi_proc;
+ struct proc_dir_entry *qpi_proc;
/* pool directory where all indexes related to this pool instance are
* stored */
/* Global quota parameters which apply to all quota type */
/* the least value of qunit */
unsigned long qpi_least_qunit;
+
+ /* Least value of qunit when soft limit is exceeded.
+ *
+ * When soft limit is exceeded, qunit will be shrinked to least_qunit
+ * (1M for block limit), that results in significant write performance
+ * drop since the client will turn to sync write from now on.
+ *
+ * To retain the write performance in an acceptable level, we choose
+ * to sacrifice grace time accuracy a bit and use a larger least_qunit
+ * when soft limit is exceeded. It's (qpi_least_qunit * 4) by default,
+ * and user may enlarge it via procfs to get even better performance
+ * (with the cost of losing more grace time accuracy).
+ *
+ * See qmt_calc_softlimit().
+ */
+ unsigned long qpi_soft_least_qunit;
};
/*