From 92ddcefc612784604a8ad42096edf16394ad081b Mon Sep 17 00:00:00 2001 From: liangzhen Date: Thu, 2 Mar 2006 13:40:09 +0000 Subject: [PATCH] . Small change to lustre.spec.in to resolve problem in rpm building, it's tested in b1_4 and b1_5. . Fix rpm building problem in b1_5 . Rename $(platform)/types.h to $(platform)/lustre_types.h to avoid confusing while compile. . portability fix for lov_obd.c --- lustre/include/Makefile.am | 4 ++-- lustre/include/darwin/{types.h => lustre_types.h} | 0 lustre/include/linux/Makefile.am | 10 ++++++++-- lustre/include/linux/{types.h => lustre_types.h} | 1 - lustre/include/lustre/types.h | 6 +++--- lustre/lov/lov_obd.c | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) rename lustre/include/darwin/{types.h => lustre_types.h} (100%) rename lustre/include/linux/{types.h => lustre_types.h} (99%) diff --git a/lustre/include/Makefile.am b/lustre/include/Makefile.am index 1547664..82850e4 100644 --- a/lustre/include/Makefile.am +++ b/lustre/include/Makefile.am @@ -6,10 +6,10 @@ SUBDIRS = linux lustre -linuxdir = $(includedir) +lustredir = $(includedir) if UTILS -linux_HEADERS = lustre_idl.h +lustre_HEADERS = lustre_idl.h endif EXTRA_DIST = ioctl.h liblustre.h lprocfs_status.h lustre_cfg.h \ diff --git a/lustre/include/darwin/types.h b/lustre/include/darwin/lustre_types.h similarity index 100% rename from lustre/include/darwin/types.h rename to lustre/include/darwin/lustre_types.h diff --git a/lustre/include/linux/Makefile.am b/lustre/include/linux/Makefile.am index 0f07562..3f5303e 100644 --- a/lustre/include/linux/Makefile.am +++ b/lustre/include/linux/Makefile.am @@ -3,8 +3,14 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -EXTRA_DIST = lprocfs_status.h lustre_debug.h lustre_lib.h types.h\ +linuxdir = $(includedir)/linux + +if UTILS +linux_HEADERS = lustre_idl.h lustre_types.h lustre_user.h +endif + +EXTRA_DIST = lprocfs_status.h lustre_debug.h lustre_lib.h \ lustre_dlm.h lustre_handles.h lustre_net.h obd_class.h obd_support.h \ lustre_log.h lustre_compat25.h lustre_fsfilt.h lustre_mds.h obd.h \ lvfs.h lvfs_linux.h lustre_lite.h lustre_idl.h lustre_quota.h \ - lustre_disk.h lustre_user.h + lustre_disk.h lustre_user.h lustre_types.h diff --git a/lustre/include/linux/types.h b/lustre/include/linux/lustre_types.h similarity index 99% rename from lustre/include/linux/types.h rename to lustre/include/linux/lustre_types.h index c09badf..5737ed9 100644 --- a/lustre/include/linux/types.h +++ b/lustre/include/linux/lustre_types.h @@ -1,7 +1,6 @@ #ifndef _LUSTRE_LINUX_TYPES_H #define _LUSTRE_LINUX_TYPES_H - #if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \ !defined(_EXT2_TYPES_H) && !defined(_I386_TYPES_H) && \ !defined(_X86_64_TYPES_H)) diff --git a/lustre/include/lustre/types.h b/lustre/include/lustre/types.h index bc3f4e9..a5da5923 100644 --- a/lustre/include/lustre/types.h +++ b/lustre/include/lustre/types.h @@ -2,11 +2,11 @@ #define _LUSTRE_TYPES_H #if defined(__linux__) -#include +#include #elif defined(__APPLE__) -#include +#include #elif defined(__WINNT__) -#include +#include #else #error Unsupported operating system. #endif diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index ca326d8..313fbaa 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -922,7 +922,7 @@ static int lov_create(struct obd_export *exp, struct obdo *src_oa, RETURN(rc); } - maxage = jiffies - lov->desc.ld_qos_maxage * HZ; + maxage = cfs_time_shift(-lov->desc.ld_qos_maxage); obd_statfs(exp->exp_obd, &osfs, maxage); rc = lov_prep_create_set(exp, ea, src_oa, oti, &set); -- 1.8.3.1