Whamcloud - gitweb
ecc977aec3eb2d2ab32021f703fcc80446fd860c
[fs/lustre-release.git] / lustre / ost / ost_internal.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  */
4
5 #ifndef OST_INTERNAL_H
6 #define OST_INTERNAL_H
7
8 #ifdef LPROCFS
9 extern void ost_print_req(void *seq_file, struct ptlrpc_request *req);
10 #else
11 # define ost_print_req NULL
12 #endif
13
14 /*
15  * tunables for per-thread page pool (bug 5137)
16  */
17 #define OST_THREAD_POOL_SIZE PTLRPC_MAX_BRW_PAGES  /* pool size in pages */
18 #define OST_THREAD_POOL_GFP  CFS_ALLOC_HIGHUSER    /* GFP mask for pool pages */
19
20 struct page;
21 struct niobuf_local;
22 struct niobuf_remote;
23 struct ptlrpc_request;
24
25 /*
26  * struct ost_thread_local_cache is allocated and initialized for each OST
27  * thread by ost_thread_init().
28  */
29 struct ost_thread_local_cache {
30         /*
31          * pool of pages and nio buffers used by write-path
32          */
33         struct page          *page  [OST_THREAD_POOL_SIZE];
34         struct niobuf_local   local [OST_THREAD_POOL_SIZE];
35         struct niobuf_remote  remote[OST_THREAD_POOL_SIZE];
36 };
37
38 struct ost_thread_local_cache *ost_tls(struct ptlrpc_request *r);
39
40 /* Quota stuff */
41 extern quota_interface_t *quota_interface;
42
43 #endif /* OST_INTERNAL_H */