Skip to content
Snippets Groups Projects
Commit 6e907930 authored by Yong Fan's avatar Yong Fan
Browse files

Branch HEAD

b=13814
i=oleg.drokin
i=sheng.yang

(1) Difine some macros and variables if "disable-server" when configure.
(2) Support to compile patchless client on HEAD.
(3) Comment for some code copy issue.
parent e13d5e35
No related branches found
No related tags found
No related merge requests found
...@@ -1350,6 +1350,7 @@ CFLAGS="$tmp_flags" ...@@ -1350,6 +1350,7 @@ CFLAGS="$tmp_flags"
AC_DEFUN([LC_PROG_LINUX], AC_DEFUN([LC_PROG_LINUX],
[LC_LUSTRE_VERSION_H [LC_LUSTRE_VERSION_H
if test x$enable_server = xyes ; then if test x$enable_server = xyes ; then
AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server])
LC_CONFIG_BACKINGFS LC_CONFIG_BACKINGFS
fi fi
LC_CONFIG_PINGER LC_CONFIG_PINGER
......
...@@ -32,8 +32,10 @@ ...@@ -32,8 +32,10 @@
# define MDS_XATTR_NAME_ACL_ACCESS XATTR_NAME_ACL_ACCESS # define MDS_XATTR_NAME_ACL_ACCESS XATTR_NAME_ACL_ACCESS
# define mds_xattr_acl_size(entry) xattr_acl_size(entry) # define mds_xattr_acl_size(entry) xattr_acl_size(entry)
# else /* HAVE_XATTR_ACL */ # else /* HAVE_XATTR_ACL */
# define MDS_XATTR_NAME_ACL_ACCESS POSIX_ACL_XATTR_ACCESS # ifdef HAVE_LINUX_POSIX_ACL_XATTR_H
# define mds_xattr_acl_size(entry) posix_acl_xattr_size(entry) # define MDS_XATTR_NAME_ACL_ACCESS POSIX_ACL_XATTR_ACCESS
# define mds_xattr_acl_size(entry) posix_acl_xattr_size(entry)
# endif /* HAVE_LINUX_POSIX_ACL_XATTR_H */
# endif /* HAVE_XATTR_ACL */ # endif /* HAVE_XATTR_ACL */
# define LUSTRE_POSIX_ACL_MAX_ENTRIES (32) # define LUSTRE_POSIX_ACL_MAX_ENTRIES (32)
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
# include <linux/smp_lock.h> # include <linux/smp_lock.h>
# include <linux/proc_fs.h> # include <linux/proc_fs.h>
# include <linux/mount.h> # include <linux/mount.h>
# ifndef HAVE_VFS_INTENT_PATCHES
# include <linux/lustre_intent.h>
# endif
#endif #endif
typedef spinlock_t client_obd_lock_t; typedef spinlock_t client_obd_lock_t;
......
...@@ -39,6 +39,33 @@ ...@@ -39,6 +39,33 @@
#include <linux/timer.h> #include <linux/timer.h>
#endif #endif
#ifdef __KERNEL__
# ifndef HAVE_SERVER_SUPPORT
/* hash info structure used by the directory hash */
# define LDISKFS_DX_HASH_LEGACY 0
# define LDISKFS_DX_HASH_HALF_MD4 1
# define LDISKFS_DX_HASH_TEA 2
# define LDISKFS_DX_HASH_R5 3
# define LDISKFS_DX_HASH_SAME 4
# define LDISKFS_DX_HASH_MAX 4
/* hash info structure used by the directory hash */
struct ldiskfs_dx_hash_info
{
u32 hash;
u32 minor_hash;
int hash_version;
u32 *seed;
};
# define LDISKFS_HTREE_EOF 0x7fffffff
int ldiskfsfs_dirhash(const char *name, int len, struct ldiskfs_dx_hash_info *hinfo);
# endif /* HAVE_SERVER_SUPPORT */
#endif /* __KERNEL__ */
void obd_zombie_impexp_init(void); void obd_zombie_impexp_init(void);
void obd_zombie_impexp_cull(void); void obd_zombie_impexp_cull(void);
extern void (*obd_zombie_impexp_notify)(void); extern void (*obd_zombie_impexp_notify)(void);
......
/* /*
* linux/fs/ldiskfs/hash.c
*
* Copyright (C) 2002 by Theodore Ts'o * Copyright (C) 2002 by Theodore Ts'o
* *
* This file is released under the GPL v2. * This file is released under the GPL v2.
...@@ -9,10 +7,20 @@ ...@@ -9,10 +7,20 @@
* License. * License.
*/ */
/*
* obdclass/hash.c is copied from ldiskfs/hash.c.
* ldiskfs is used by server only.
* obdclass is shared by both client and server, it should not depend on ldiskfs.
*/
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/jbd.h> #include <linux/jbd.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/ldiskfs_fs.h> #ifdef HAVE_SERVER_SUPPORT
# include <linux/ldiskfs_fs.h>
#else
# include <obd_class.h>
#endif
#define DELTA 0x9E3779B9 #define DELTA 0x9E3779B9
......
...@@ -20,16 +20,15 @@ ...@@ -20,16 +20,15 @@
*/ */
#define DEBUG_SUBSYSTEM S_CLASS #define DEBUG_SUBSYSTEM S_CLASS
#include <obd_class.h>
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/kmod.h> /* for request_module() */ #include <linux/kmod.h> /* for request_module() */
#include <linux/module.h> #include <linux/module.h>
#include <obd_class.h>
#include <linux/random.h> #include <linux/random.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/pagemap.h> #include <linux/pagemap.h>
#else #else
#include <liblustre.h> #include <liblustre.h>
#include <obd_class.h>
#include <obd.h> #include <obd.h>
#endif #endif
#include <lprocfs_status.h> #include <lprocfs_status.h>
...@@ -37,9 +36,11 @@ ...@@ -37,9 +36,11 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/jbd.h> #include <linux/jbd.h>
#ifdef HAVE_SERVER_SUPPORT
/* LDISKFS_SB() */ /* LDISKFS_SB() */
#include <linux/ldiskfs_fs.h> #include <linux/ldiskfs_fs.h>
#endif #endif
#endif
static int mea_last_char_hash(int count, char *name, int namelen) static int mea_last_char_hash(int count, char *name, int namelen)
{ {
unsigned int c; unsigned int c;
......
...@@ -11,9 +11,6 @@ ...@@ -11,9 +11,6 @@
#include <limits.h> #include <limits.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#if 0
#include <linux/ldiskfs_fs.h>
#endif
#include <liblustre.h> #include <liblustre.h>
#include <lustre_lib.h> #include <lustre_lib.h>
#include <obd.h> #include <obd.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment