Whamcloud - gitweb
LU-8726 osd-ldiskfs: bypass read for benchmarking
[fs/lustre-release.git] / lustre / include / lustre_nrs_fifo.h
1 /*
2  * GPL HEADER START
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 only,
8  * as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License version 2 for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * version 2 along with this program; If not, see
17  * http://www.gnu.org/licenses/gpl-2.0.html
18  *
19  * GPL HEADER END
20  */
21 /*
22  * Copyright (c) 2014, Intel Corporation.
23  *
24  * Copyright 2012 Xyratex Technology Limited
25  */
26 /*
27  *
28  * Network Request Scheduler (NRS) First-in First-out (FIFO) policy
29  *
30  */
31
32 #ifndef _LUSTRE_NRS_FIFO_H
33 #define _LUSTRE_NRS_FIFO_H
34
35 /* \name fifo
36  *
37  * FIFO policy
38  *
39  * This policy is a logical wrapper around previous, non-NRS functionality.
40  * It dispatches RPCs in the same order as they arrive from the network. This
41  * policy is currently used as the fallback policy, and the only enabled policy
42  * on all NRS heads of all PTLRPC service partitions.
43  * @{
44  */
45
46 /**
47  * Private data structure for the FIFO policy
48  */
49 struct nrs_fifo_head {
50         /**
51          * Resource object for policy instance.
52          */
53         struct ptlrpc_nrs_resource      fh_res;
54         /**
55          * List of queued requests.
56          */
57         struct list_head                fh_list;
58         /**
59          * For debugging purposes.
60          */
61         __u64                           fh_sequence;
62 };
63
64 struct nrs_fifo_req {
65         struct list_head        fr_list;
66         __u64                   fr_sequence;
67 };
68
69 /** @} fifo */
70 #endif