From: yangsheng Date: Thu, 17 Jan 2008 09:08:35 +0000 (+0000) Subject: Branch HEAD X-Git-Tag: v1_7_0_51~311 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=e89ebc59c4d7b65c7f78fd2e18312d5be4b535c5;p=fs%2Flustre-release.git Branch HEAD b=14482 i=shadow i=green Correctly detect the PG_fs_misc and PG_checked flags. --- diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 4fec361..05650b9 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -12,6 +12,10 @@ tbd Sun Microsystems, Inc. * RHEL 4 and RHEL 5/SLES 10 clients behaves differently on 'cd' to a removed cwd "./" (refer to Bugzilla 14399). +Severity : enhancement +Bugzilla : 14482 +Description: Add rhel5 support to HEAD. + Severity : normal Bugzilla : 13375 Descriptoin: make lov_create() will not stuck in obd_statfs_rqset() diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index b6a7110..820355f 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1114,6 +1114,27 @@ LB_LINUX_TRY_COMPILE([ ]) ]) +# RHEL5 PageChecked and SetPageChecked defined +AC_DEFUN([LC_PAGE_CHECKED], +[AC_MSG_CHECKING([kernel has PageChecked and SetPageChecked]) +LB_LINUX_TRY_COMPILE([ + #include +],[ + #ifndef PageChecked + #error PageChecked not defined in kernel + #endif + #ifndef SetPageChecked + #error SetPageChecked not defined in kernel + #endif +],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PAGE_CHECKED, 1, + [does kernel have PageChecked and SetPageChecked]) +],[ + AC_MSG_RESULT(NO) +]) +]) + AC_DEFUN([LC_EXPORT_TRUNCATE_COMPLETE], [LB_CHECK_SYMBOL_EXPORT([truncate_complete_page], [mm/truncate.c],[ @@ -1430,6 +1451,7 @@ AC_DEFUN([LC_PROG_LINUX], #2.6.18 + RHEL5 (fc6) LC_PG_FS_MISC + LC_PAGE_CHECKED # 2.6.19 LC_INODE_BLKSIZE diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index ebea76c..2afec74 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -46,9 +46,13 @@ #include #include "llite_internal.h" +#ifndef HAVE_PAGE_CHECKED #ifdef HAVE_PG_FS_MISC #define PageChecked(page) test_bit(PG_fs_misc, &(page)->flags) #define SetPageChecked(page) set_bit(PG_fs_misc, &(page)->flags) +#else +#error PageChecked or PageFsMisc not defined in kernel +#endif #endif /* @@ -129,11 +133,6 @@ * */ -#ifdef HAVE_PG_FS_MISC -#define PageChecked(page) test_bit(PG_fs_misc, &(page)->flags) -#define SetPageChecked(page) set_bit(PG_fs_misc, &(page)->flags) -#endif - /* returns the page unlocked, but with a reference */ static int ll_dir_readpage(struct file *file, struct page *page) {