Whamcloud - gitweb
make fld really stand-alone service independent from mdt
[fs/lustre-release.git] / lustre / fld / fld_internal.h
1 /* -*- MODE: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  *  fld/fld.c
5  *
6  *  Copyright (C) 2006 Cluster File Systems, Inc.
7  *
8  *   This file is part of the Lustre file system, http://www.lustre.org
9  *   Lustre is a trademark of Cluster File Systems, Inc.
10  *
11  *   You may have signed or agreed to another license before downloading
12  *   this software.  If so, you are bound by the terms and conditions
13  *   of that agreement, and the following does not apply to you.  See the
14  *   LICENSE file included with this distribution for more information.
15  *
16  *   If you did not agree to a different license, then this copy of Lustre
17  *   is open source software; you can redistribute it and/or modify it
18  *   under the terms of version 2 of the GNU General Public License as
19  *   published by the Free Software Foundation.
20  *
21  *   In either case, Lustre is distributed in the hope that it will be
22  *   useful, but WITHOUT ANY WARRANTY; without even the implied warranty
23  *   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24  *   license text for more details.
25  */
26 #ifndef _FLD_INTERNAL_H
27 #define _FLD_INTERNAL_H
28
29 struct fld_cache {
30         struct hlist_node fld_list;
31         __u64             fld_mds;
32         __u64             fld_seq;
33 };
34 struct fld_cache_info {
35         struct hlist_head *fld_hash;
36         spinlock_t fld_lock;
37         int fld_hash_mask;
38 };
39 /*XXX use linked list temp for fld in this prototype*/
40 struct fld_list {
41         struct list_head fld_list;
42         spinlock_t       fld_lock;
43 };
44 struct fld_item{
45         struct list_head fld_list;
46         __u64 fld_seq;
47         __u64 fld_mds;
48 };
49
50 enum fld_op {
51         FLD_CREATE = 0,
52         FLD_DELETE = 1,
53         FLD_GET    = 2
54 };
55
56 #define FLD_SERVICE_WATCHDOG_TIMEOUT (obd_timeout * 1000)
57
58 #endif