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.
26 #include <lustre/lustre_idl.h>
27 #include <lustre_req_layout.h>
28 #include <md_object.h>
29 #include <dt_object.h>
30 #include <libcfs/list.h>
31 #include <libcfs/kp30.h>
34 * Common thread info for mdt, seq and fld
36 struct com_thread_info {
38 * for req-layout interface.
40 struct req_capsule cti_pill;
44 #define MDT_IDMAP_HASHSIZE (32)
45 #define MDT_IDMAP_HASHFUNC(id) ((id) & (MDT_IDMAP_HASHSIZE - 1))
55 struct mdt_idmap_table {
57 struct list_head mit_idmaps[MDT_IDMAP_N_HASHES]
65 static inline int err_serious(int rc)
68 LASSERT(-rc < ESERIOUS);
69 return -(-rc | ESERIOUS);
72 static inline int clear_serious(int rc)
75 rc = -(-rc & ~ESERIOUS);
79 static inline int is_serious(int rc)
81 return (rc < 0 && -rc & ESERIOUS);