* \retval 0 e1 > e2
* \retval 1 e1 <= e2
*/
-static int crrn_req_compare(cfs_binheap_node_t *e1, cfs_binheap_node_t *e2)
+static int
+crrn_req_compare(struct cfs_binheap_node *e1, struct cfs_binheap_node *e2)
{
struct ptlrpc_nrs_request *nrq1;
struct ptlrpc_nrs_request *nrq2;
return nrq1->nr_u.crr.cr_sequence < nrq2->nr_u.crr.cr_sequence;
}
-static cfs_binheap_ops_t nrs_crrn_heap_ops = {
+static struct cfs_binheap_ops nrs_crrn_heap_ops = {
.hop_enter = NULL,
.hop_exit = NULL,
.hop_compare = crrn_req_compare,
#define NRS_NID_BKT_BITS 8
#define NRS_NID_BITS 16
-static unsigned nrs_crrn_hop_hash(cfs_hash_t *hs, const void *key,
+static unsigned nrs_crrn_hop_hash(struct cfs_hash *hs, const void *key,
unsigned mask)
{
return cfs_hash_djb2_hash(key, sizeof(lnet_nid_t), mask);
return hlist_entry(hnode, struct nrs_crrn_client, cc_hnode);
}
-static void nrs_crrn_hop_get(cfs_hash_t *hs, struct hlist_node *hnode)
+static void nrs_crrn_hop_get(struct cfs_hash *hs, struct hlist_node *hnode)
{
struct nrs_crrn_client *cli = hlist_entry(hnode,
struct nrs_crrn_client,
atomic_inc(&cli->cc_ref);
}
-static void nrs_crrn_hop_put(cfs_hash_t *hs, struct hlist_node *hnode)
+static void nrs_crrn_hop_put(struct cfs_hash *hs, struct hlist_node *hnode)
{
struct nrs_crrn_client *cli = hlist_entry(hnode,
struct nrs_crrn_client,
atomic_dec(&cli->cc_ref);
}
-static void nrs_crrn_hop_exit(cfs_hash_t *hs, struct hlist_node *hnode)
+static void nrs_crrn_hop_exit(struct cfs_hash *hs, struct hlist_node *hnode)
{
struct nrs_crrn_client *cli = hlist_entry(hnode,
struct nrs_crrn_client,
OBD_FREE_PTR(cli);
}
-static cfs_hash_ops_t nrs_crrn_hash_ops = {
+static struct cfs_hash_ops nrs_crrn_hash_ops = {
.hs_hash = nrs_crrn_hop_hash,
.hs_keycmp = nrs_crrn_hop_keycmp,
.hs_key = nrs_crrn_hop_key,
bool peek, bool force)
{
struct nrs_crrn_net *net = policy->pol_private;
- cfs_binheap_node_t *node = cfs_binheap_root(net->cn_binheap);
+ struct cfs_binheap_node *node = cfs_binheap_root(net->cn_binheap);
struct ptlrpc_nrs_request *nrq;
nrq = unlikely(node == NULL) ? NULL :
*/
if (unlikely(is_root)) {
/** Peek at the next request to be served */
- cfs_binheap_node_t *node = cfs_binheap_root(net->cn_binheap);
+ struct cfs_binheap_node *node = cfs_binheap_root(net->cn_binheap);
/** No more requests */
if (unlikely(node == NULL)) {
*/
static ssize_t
ptlrpc_lprocfs_nrs_crrn_quantum_seq_write(struct file *file,
- const char *buffer, size_t count,
+ const char __user *buffer,
+ size_t count,
loff_t *off)
{
struct ptlrpc_service *svc = ((struct seq_file *)file->private_data)->private;