1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2001-2003 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.
23 #ifndef __LINUX_CLASS_OBD_H
24 #define __LINUX_CLASS_OBD_H
27 #error Do not #include this file directly. #include <obd_class.h> instead
31 #include <sys/types.h>
32 #include <libcfs/list.h>
35 # include <asm/segment.h>
37 #include <asm/uaccess.h>
38 #include <linux/types.h>
40 #include <linux/time.h>
41 #include <linux/timer.h>
45 # ifndef HAVE_SERVER_SUPPORT
47 /* hash info structure used by the directory hash */
48 # define LDISKFS_DX_HASH_LEGACY 0
49 # define LDISKFS_DX_HASH_HALF_MD4 1
50 # define LDISKFS_DX_HASH_TEA 2
51 # define LDISKFS_DX_HASH_R5 3
52 # define LDISKFS_DX_HASH_SAME 4
53 # define LDISKFS_DX_HASH_MAX 4
55 /* hash info structure used by the directory hash */
56 struct ldiskfs_dx_hash_info
64 # define LDISKFS_HTREE_EOF 0x7fffffff
66 int ldiskfsfs_dirhash(const char *name, int len, struct ldiskfs_dx_hash_info *hinfo);
68 # endif /* HAVE_SERVER_SUPPORT */
69 #endif /* __KERNEL__ */
71 void obd_zombie_impexp_init(void);
72 void obd_zombie_impexp_cull(void);
73 extern void (*obd_zombie_impexp_notify)(void);
77 void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid);
78 void obdo_from_la(struct obdo *dst, struct lu_attr *la, obd_flag valid);
79 void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid);
80 void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid);
83 #if !defined(__KERNEL__)
84 #define to_kdev_t(dev) dev
85 #define kdev_t_to_nr(dev) dev
88 #endif /* __LINUX_OBD_CLASS_H */