Whamcloud - gitweb
Branch HEAD
authoryangsheng <yangsheng>
Thu, 17 Jan 2008 09:08:35 +0000 (09:08 +0000)
committeryangsheng <yangsheng>
Thu, 17 Jan 2008 09:08:35 +0000 (09:08 +0000)
b=14482
i=shadow
i=green

Correctly detect the PG_fs_misc and PG_checked flags.

lustre/ChangeLog
lustre/autoconf/lustre-core.m4
lustre/llite/dir.c

index 4fec361..05650b9 100644 (file)
@@ -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).
 
        * 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()
 Severity   : normal
 Bugzilla   : 13375
 Descriptoin: make lov_create() will not stuck in obd_statfs_rqset()
index b6a7110..820355f 100644 (file)
@@ -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 <linux/page-flags.h>
+],[
+        #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],[
 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
 
          #2.6.18 + RHEL5 (fc6)
          LC_PG_FS_MISC
+         LC_PAGE_CHECKED
 
          # 2.6.19
          LC_INODE_BLKSIZE
 
          # 2.6.19
          LC_INODE_BLKSIZE
index ebea76c..2afec74 100644 (file)
 #include <lustre_fid.h>
 #include "llite_internal.h"
 
 #include <lustre_fid.h>
 #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)
 #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
 
 /*
 #endif
 
 /*
  *
  */
 
  *
  */
 
-#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)
 {
 /* returns the page unlocked, but with a reference */
 static int ll_dir_readpage(struct file *file, struct page *page)
 {