1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2006 Cluster File Systems, Inc.
6 * This file is part of Lustre, http://www.lustre.org.
8 * Lustre is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU General Public
10 * License as published by the Free Software Foundation.
12 * Lustre is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Lustre; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 #include <linux/lustre_idl.h>
31 #include <libcfs/list.h>
32 #include <libcfs/kp30.h>
35 struct lu_seq_mgr_ops {
36 int (*smo_read) (struct lu_context *, void *opaque, __u64 *);
37 int (*smo_write) (struct lu_context *, void *opaque, __u64 *);
41 /* seq management fields */
42 struct semaphore m_seq_sem;
45 /* ops related stuff */
47 struct lu_seq_mgr_ops *m_ops;
50 /* init/fini methods */
51 struct lu_seq_mgr *seq_mgr_init(struct lu_seq_mgr_ops *, void *);
52 void seq_mgr_fini(struct lu_seq_mgr *);
54 /* seq management methods */
55 int seq_mgr_setup(struct lu_context *, struct lu_seq_mgr *);
56 int seq_mgr_read(struct lu_context *, struct lu_seq_mgr *);
57 int seq_mgr_write(struct lu_context *, struct lu_seq_mgr *);
58 int seq_mgr_alloc(struct lu_context *, struct lu_seq_mgr *, __u64 *);
61 int fid_is_local(struct lu_site *site, const struct lu_fid *fid);
63 static inline int fid_is_local(struct lu_site *site, const struct lu_fid *fid)
69 #endif /* __LINUX_OBD_CLASS_H */