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/libcfs.h>
33 * Common thread info for mdt, seq and fld
35 struct com_thread_info {
37 * for req-layout interface.
39 struct req_capsule *cti_pill;
46 static inline int err_serious(int rc)
49 LASSERT(-rc < ESERIOUS);
50 return -(-rc | ESERIOUS);
53 static inline int clear_serious(int rc)
56 rc = -(-rc & ~ESERIOUS);
60 static inline int is_serious(int rc)
62 return (rc < 0 && -rc & ESERIOUS);