1 /* -*- MODE: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
6 * Copyright (C) 2006 Cluster File Systems, Inc.
8 * This file is part of the Lustre file system, http://www.lustre.org
9 * Lustre is a trademark of Cluster File Systems, Inc.
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.
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.
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.
26 #ifndef _FLD_INTERNAL_H
27 #define _FLD_INTERNAL_H
30 #define fidseq_t __u64
32 #define key_cmp(e1, e2) ({ \
33 typeof(e1) __e1 = (e1); \
34 typeof(e2) __e2 = (e2); \
35 __e1 > __e2 ? +1 : (__e1 < __e2 ? -1 : 0); \
39 struct hlist_node fld_list;
43 struct fld_cache_info {
44 struct hlist_head *fld_hash;
48 /*XXX use linked list temp for fld in this prototype*/
50 struct list_head fld_list;
54 struct list_head fld_list;
65 #define FLD_SERVICE_WATCHDOG_TIMEOUT (obd_timeout * 1000)
69 struct iam_container fi_container;
72 int fld_handle_insert(struct fld_info *fld, fidseq_t seq_num, mdsno_t mdsno);
73 int fld_handle_delete(struct fld_info *fld, fidseq_t seq_num, mdsno_t mdsno);
74 int fld_handle_lookup(struct fld_info *fld, fidseq_t seq_num, mdsno_t *mds);
76 int fld_info_init(struct fld_info *fld_info);
77 void fld_info_fini(struct fld_info *fld_info);