X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Fptlrpc%2Fnrs_orr.c;h=284f81f8f75f8196e85c5b98ea7d215c75988ee2;hb=ad75291c70e67acb6fd607e373be045e9d16d3fc;hp=3a949a4ba89d1f82522496504a4a2c0ab763cdfd;hpb=d8278c699434fd7975609e121a1a75820595a601;p=fs%2Flustre-release.git diff --git a/lustre/ptlrpc/nrs_orr.c b/lustre/ptlrpc/nrs_orr.c index 3a949a4..284f81f 100644 --- a/lustre/ptlrpc/nrs_orr.c +++ b/lustre/ptlrpc/nrs_orr.c @@ -20,7 +20,7 @@ * GPL HEADER END */ /* - * Copyright (c) 2013, 2014, Intel Corporation. + * Copyright (c) 2013, 2016, Intel Corporation. * * Copyright 2012 Xyratex Technology Limited */ @@ -524,7 +524,8 @@ static struct cfs_hash_ops nrs_trr_hash_ops = { * \retval 0 e1 > e2 * \retval 1 e1 < e2 */ -static int orr_req_compare(cfs_binheap_node_t *e1, cfs_binheap_node_t *e2) +static int +orr_req_compare(struct cfs_binheap_node *e1, struct cfs_binheap_node *e2) { struct ptlrpc_nrs_request *nrq1; struct ptlrpc_nrs_request *nrq2; @@ -579,7 +580,7 @@ static int orr_req_compare(cfs_binheap_node_t *e1, cfs_binheap_node_t *e2) /** * ORR binary heap operations */ -static cfs_binheap_ops_t nrs_orr_heap_ops = { +static struct cfs_binheap_ops nrs_orr_heap_ops = { .hop_enter = NULL, .hop_exit = NULL, .hop_compare = orr_req_compare, @@ -693,10 +694,8 @@ static int nrs_orr_start(struct ptlrpc_nrs_policy *policy, char *arg) RETURN(rc); failed: - if (orrd->od_cache) { + if (orrd->od_cache) kmem_cache_destroy(orrd->od_cache); - LASSERTF(rc == 0, "Could not destroy od_cache slab\n"); - } if (orrd->od_binheap != NULL) cfs_binheap_destroy(orrd->od_binheap); @@ -946,7 +945,7 @@ struct ptlrpc_nrs_request *nrs_orr_req_get(struct ptlrpc_nrs_policy *policy, bool peek, bool force) { struct nrs_orr_data *orrd = policy->pol_private; - cfs_binheap_node_t *node = cfs_binheap_root(orrd->od_binheap); + struct cfs_binheap_node *node = cfs_binheap_root(orrd->od_binheap); struct ptlrpc_nrs_request *nrq; nrq = unlikely(node == NULL) ? NULL : @@ -968,14 +967,14 @@ struct ptlrpc_nrs_request *nrs_orr_req_get(struct ptlrpc_nrs_policy *policy, CDEBUG(D_RPCTRACE, "NRS: starting to handle %s request for object " "with FID "DFID", from OST with index %u, with " - "round "LPU64"\n", NRS_POL_NAME_ORR, + "round %llu\n", NRS_POL_NAME_ORR, PFID(&orro->oo_key.ok_fid), nrq->nr_u.orr.or_key.ok_idx, nrq->nr_u.orr.or_round); else CDEBUG(D_RPCTRACE, "NRS: starting to handle %s request from OST " - "with index %u, with round "LPU64"\n", + "with index %u, with round %llu\n", NRS_POL_NAME_TRR, nrq->nr_u.orr.or_key.ok_idx, nrq->nr_u.orr.or_round); @@ -1121,7 +1120,7 @@ static void nrs_orr_req_del(struct ptlrpc_nrs_policy *policy, */ if (unlikely(is_root)) { /** Peek at the next request to be served */ - cfs_binheap_node_t *node = cfs_binheap_root(orrd->od_binheap); + struct cfs_binheap_node *node = cfs_binheap_root(orrd->od_binheap); /** No more requests */ if (unlikely(node == NULL)) { @@ -1151,13 +1150,13 @@ static void nrs_orr_req_stop(struct ptlrpc_nrs_policy *policy, NRS_POL_NAME_MAX) == 0) CDEBUG(D_RPCTRACE, "NRS: finished handling %s request for object with FID " - DFID", from OST with index %u, with round "LPU64"\n", + DFID", from OST with index %u, with round %llu\n", NRS_POL_NAME_ORR, PFID(&nrq->nr_u.orr.or_key.ok_fid), nrq->nr_u.orr.or_key.ok_idx, nrq->nr_u.orr.or_round); else CDEBUG(D_RPCTRACE, "NRS: finished handling %s request from OST with index %u," - " with round "LPU64"\n", + " with round %llu\n", NRS_POL_NAME_TRR, nrq->nr_u.orr.or_key.ok_idx, nrq->nr_u.orr.or_round); } @@ -1279,7 +1278,8 @@ no_hp: * almost identical; it can be reworked and then reused for ORR/TRR. */ static ssize_t -ptlrpc_lprocfs_nrs_orr_quantum_seq_write(struct file *file, const char *buffer, +ptlrpc_lprocfs_nrs_orr_quantum_seq_write(struct file *file, + const char __user *buffer, size_t count, loff_t *off) { struct seq_file *m = file->private_data; @@ -1493,7 +1493,8 @@ no_hp: */ static ssize_t ptlrpc_lprocfs_nrs_orr_offset_type_seq_write(struct file *file, - const char *buffer, size_t count, + const char __user *buffer, + size_t count, loff_t *off) { struct seq_file *m = file->private_data; @@ -1752,7 +1753,8 @@ no_hp: */ static ssize_t ptlrpc_lprocfs_nrs_orr_supported_seq_write(struct file *file, - const char *buffer, size_t count, + const char __user *buffer, + size_t count, loff_t *off) { struct seq_file *m = file->private_data;