Whamcloud - gitweb
LU-657 test: limit the write size in run_dd
[fs/lustre-release.git] / lustre / obdecho / echo_internal.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, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License version 2 for more details (a copy is included
14  * in the LICENSE file that accompanied this code).
15  *
16  * You should have received a copy of the GNU General Public License
17  * version 2 along with this program; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 021110-1307, USA
20  *
21  * GPL HEADER END
22  */
23 /*
24  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
25  * Use is subject to license terms.
26  *
27  * Copyright (c) 2012, Whamcloud, Inc.
28  */
29 /*
30  * This file is part of Lustre, http://www.lustre.org/
31  * Lustre is a trademark of Sun Microsystems, Inc.
32  *
33  * lustre/obdecho/echo_internal.h
34  */
35
36 #ifndef _ECHO_INTERNAL_H
37 #define _ECHO_INTERNAL_H
38
39 /* The persistent object (i.e. actually stores stuff!) */
40 #define ECHO_PERSISTENT_OBJID    1ULL
41 #define ECHO_PERSISTENT_SIZE     ((__u64)(1<<20))
42
43 /* block size to use for data verification */
44 #define OBD_ECHO_BLOCK_SIZE     (4<<10)
45
46 #ifdef __KERNEL__
47 # ifdef HAVE_SERVER_SUPPORT
48 extern struct obd_ops echo_obd_ops;
49 int echo_persistent_pages_init(void);
50 void echo_persistent_pages_fini(void);
51 # endif
52 #else /* ! __KERNEL__ */
53 /* Kludge here, define some functions and macros needed by liblustre -jay */
54 static inline void page_cache_get(struct page *page)
55 {
56 }
57
58 static inline void page_cache_release(struct page *page)
59 {
60 }
61
62 #define READ    0
63 #define WRITE   1
64
65 #endif /* ifdef __KERNEL__ */
66
67 #endif