X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fautoconf%2Flustre-core.m4;h=45146fecedff7313ffe1c69bbcc1fe98af3f81d6;hp=4fea8cce307b9fa7e3a9f2b9eb8b6cb103f2829a;hb=2c90cdfc2de97cbe93d34c93e646a3dd9b230a75;hpb=14475d1ada011baa16e439712ce4a32da109ecb3;ds=sidebyside diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 4fea8cc..45146fe 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -979,11 +979,10 @@ EXTRA_KCFLAGS="-Werror" LB_LINUX_TRY_COMPILE([ #include ],[ - struct super_operations *sop = NULL; - sop->statfs((struct dentry *)0, (struct kstatfs*)0); + ((struct super_operations *)0)->statfs((struct dentry *)0, (struct kstatfs*)0); ],[ AC_DEFINE(HAVE_STATFS_DENTRY_PARAM, 1, - [super_ops.statfs() first parameter is dentry]) + [super_ops.statfs() first parameter is dentry]) AC_MSG_RESULT([yes]) ],[ AC_MSG_RESULT([no]) @@ -1159,19 +1158,20 @@ LB_LINUX_TRY_COMPILE([ AC_DEFUN([LC_PAGE_CHECKED], [AC_MSG_CHECKING([kernel has PageChecked and SetPageChecked]) LB_LINUX_TRY_COMPILE([ + #include #ifdef HAVE_LINUX_MMTYPES_H #include #endif - #include + #include ],[ - struct page *p; + struct page *p = NULL; /* before 2.6.26 this define*/ #ifndef PageChecked - /* 2.6.26 use function instead of define for it */ - SetPageChecked(p); - PageChecked(p); - #endif + /* 2.6.26 use function instead of define for it */ + SetPageChecked(p); + PageChecked(p); + #endif ],[ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_PAGE_CHECKED, 1, @@ -2077,6 +2077,26 @@ LB_LINUX_TRY_COMPILE([ ]) # +# 2.6.36 fs_struct.lock use spinlock instead of rwlock. +# +AC_DEFUN([LC_FS_STRUCT_RWLOCK], +[AC_MSG_CHECKING([if fs_struct.lock use rwlock]) +LB_LINUX_TRY_COMPILE([ + #include + #include + #include +],[ + ((struct fs_struct *)0)->lock = (rwlock_t){ 0 }; +],[ + AC_DEFINE(HAVE_FS_STRUCT_RWLOCK, 1, + [fs_struct.lock use rwlock]) + AC_MSG_RESULT([yes]) +],[ + AC_MSG_RESULT([no]) +]) +]) + +# # 2.6.36 super_operations add evict_inode method. it hybird of # delete_inode & clear_inode. # @@ -2146,6 +2166,28 @@ LB_LINUX_TRY_COMPILE([ ]) # +# 2.6.38 use path as 4th parameter in quota_on. +# +AC_DEFUN([LC_QUOTA_ON_USE_PATH], +[AC_MSG_CHECKING([quota_on use path as parameter]) +tmp_flags="$EXTRA_KCFLAGS" +EXTRA_KCFLAGS="-Werror" +LB_LINUX_TRY_COMPILE([ + #include + #include +],[ + ((struct quotactl_ops *)0)->quota_on(NULL, 0, 0, ((struct path*)0)); +],[ + AC_DEFINE(HAVE_QUOTA_ON_USE_PATH, 1, + [quota_on use path as 4th paramter]) + AC_MSG_RESULT([yes]) +],[ + AC_MSG_RESULT([no]) +]) +EXTRA_KCFLAGS="$tmp_flags" +]) + +# # 2.6.39 remove unplug_fn from request_queue. # AC_DEFUN([LC_REQUEST_QUEUE_UNPLUG_FN], @@ -2342,12 +2384,14 @@ AC_DEFUN([LC_PROG_LINUX], LC_FILE_FSYNC # 2.6.36 + LC_FS_STRUCT_RWLOCK LC_SBOPS_EVICT_INODE # 2.6.38 LC_ATOMIC_MNT_COUNT LC_BLKDEV_GET_BY_DEV LC_GENERIC_PERMISSION + LC_QUOTA_ON_USE_PATH # 2.6.39 LC_REQUEST_QUEUE_UNPLUG_FN