Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-6635 lfsck: block replacing the OST-object for test
[fs/lustre-release.git]
/
lustre
/
ptlrpc
/
nrs_fifo.c
diff --git
a/lustre/ptlrpc/nrs_fifo.c
b/lustre/ptlrpc/nrs_fifo.c
index
a77d533
..
369b599
100644
(file)
--- a/
lustre/ptlrpc/nrs_fifo.c
+++ b/
lustre/ptlrpc/nrs_fifo.c
@@
-20,7
+20,7
@@
* GPL HEADER END
*/
/*
* GPL HEADER END
*/
/*
- * Copyright (c) 2011
Intel Corporation
+ * Copyright (c) 2011
, 2014, Intel Corporation.
*
* Copyright 2012 Xyratex Technology Limited
*/
*
* Copyright 2012 Xyratex Technology Limited
*/
@@
-47,9
+47,6
@@
*/
#define DEBUG_SUBSYSTEM S_RPC
*/
#define DEBUG_SUBSYSTEM S_RPC
-#ifndef __KERNEL__
-#include <liblustre.h>
-#endif
#include <obd_support.h>
#include <obd_class.h>
#include <libcfs/libcfs.h>
#include <obd_support.h>
#include <obd_class.h>
#include <libcfs/libcfs.h>
@@
-79,7
+76,7
@@
* \see nrs_policy_register()
* \see nrs_policy_ctl()
*/
* \see nrs_policy_register()
* \see nrs_policy_ctl()
*/
-static int nrs_fifo_start(struct ptlrpc_nrs_policy *policy)
+static int nrs_fifo_start(struct ptlrpc_nrs_policy *policy
, char *arg
)
{
struct nrs_fifo_head *head;
{
struct nrs_fifo_head *head;
@@
-87,7
+84,7
@@
static int nrs_fifo_start(struct ptlrpc_nrs_policy *policy)
if (head == NULL)
return -ENOMEM;
if (head == NULL)
return -ENOMEM;
-
CFS_
INIT_LIST_HEAD(&head->fh_list);
+ INIT_LIST_HEAD(&head->fh_list);
policy->pol_private = head;
return 0;
}
policy->pol_private = head;
return 0;
}
@@
-106,7
+103,7
@@
static void nrs_fifo_stop(struct ptlrpc_nrs_policy *policy)
struct nrs_fifo_head *head = policy->pol_private;
LASSERT(head != NULL);
struct nrs_fifo_head *head = policy->pol_private;
LASSERT(head != NULL);
- LASSERT(
cfs_
list_empty(&head->fh_list));
+ LASSERT(list_empty(&head->fh_list));
OBD_FREE_PTR(head);
}
OBD_FREE_PTR(head);
}
@@
-166,8
+163,8
@@
struct ptlrpc_nrs_request * nrs_fifo_req_get(struct ptlrpc_nrs_policy *policy,
struct nrs_fifo_head *head = policy->pol_private;
struct ptlrpc_nrs_request *nrq;
struct nrs_fifo_head *head = policy->pol_private;
struct ptlrpc_nrs_request *nrq;
- nrq = unlikely(
cfs_
list_empty(&head->fh_list)) ? NULL :
-
cfs_
list_entry(head->fh_list.next, struct ptlrpc_nrs_request,
+ nrq = unlikely(list_empty(&head->fh_list)) ? NULL :
+ list_entry(head->fh_list.next, struct ptlrpc_nrs_request,
nr_u.fifo.fr_list);
if (likely(!peek && nrq != NULL)) {
nr_u.fifo.fr_list);
if (likely(!peek && nrq != NULL)) {
@@
-175,9
+172,9
@@
struct ptlrpc_nrs_request * nrs_fifo_req_get(struct ptlrpc_nrs_policy *policy,
struct ptlrpc_request,
rq_nrq);
struct ptlrpc_request,
rq_nrq);
-
cfs_
list_del_init(&nrq->nr_u.fifo.fr_list);
+ list_del_init(&nrq->nr_u.fifo.fr_list);
- CDEBUG(D_RPCTRACE, "NRS start %s request from %s, seq:
"LPU64
+ CDEBUG(D_RPCTRACE, "NRS start %s request from %s, seq:
%llu"
"\n", policy->pol_desc->pd_name,
libcfs_id2str(req->rq_peer), nrq->nr_u.fifo.fr_sequence);
}
"\n", policy->pol_desc->pd_name,
libcfs_id2str(req->rq_peer), nrq->nr_u.fifo.fr_sequence);
}
@@
-205,7
+202,7
@@
static int nrs_fifo_req_add(struct ptlrpc_nrs_policy *policy,
* Only used for debugging
*/
nrq->nr_u.fifo.fr_sequence = head->fh_sequence++;
* Only used for debugging
*/
nrq->nr_u.fifo.fr_sequence = head->fh_sequence++;
-
cfs_
list_add_tail(&nrq->nr_u.fifo.fr_list, &head->fh_list);
+ list_add_tail(&nrq->nr_u.fifo.fr_list, &head->fh_list);
return 0;
}
return 0;
}
@@
-219,8
+216,8
@@
static int nrs_fifo_req_add(struct ptlrpc_nrs_policy *policy,
static void nrs_fifo_req_del(struct ptlrpc_nrs_policy *policy,
struct ptlrpc_nrs_request *nrq)
{
static void nrs_fifo_req_del(struct ptlrpc_nrs_policy *policy,
struct ptlrpc_nrs_request *nrq)
{
- LASSERT(!
cfs_
list_empty(&nrq->nr_u.fifo.fr_list));
-
cfs_
list_del_init(&nrq->nr_u.fifo.fr_list);
+ LASSERT(!list_empty(&nrq->nr_u.fifo.fr_list));
+ list_del_init(&nrq->nr_u.fifo.fr_list);
}
/**
}
/**
@@
-239,7
+236,7
@@
static void nrs_fifo_req_stop(struct ptlrpc_nrs_policy *policy,
struct ptlrpc_request *req = container_of(nrq, struct ptlrpc_request,
rq_nrq);
struct ptlrpc_request *req = container_of(nrq, struct ptlrpc_request,
rq_nrq);
- CDEBUG(D_RPCTRACE, "NRS stop %s request from %s, seq:
"LPU64"
\n",
+ CDEBUG(D_RPCTRACE, "NRS stop %s request from %s, seq:
%llu
\n",
policy->pol_desc->pd_name, libcfs_id2str(req->rq_peer),
nrq->nr_u.fifo.fr_sequence);
}
policy->pol_desc->pd_name, libcfs_id2str(req->rq_peer),
nrq->nr_u.fifo.fr_sequence);
}