From 59eea8ef2a66836d0b0470edb5c26e1764f31cf7 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Wed, 11 Sep 2013 13:09:16 -0400 Subject: [PATCH] LU-2800 autoconf: remove quota_on/quota_off checks With the rewrite of the Lustre quota code we no longer need ll_quota_[on/off]. Those obsolete methods touched linux kernel internals that have changed over time. With ll_quota_[on/off[ gone we can remove all the quota autoconf that was required. Signed-off-by: James Simmons Signed-off-by: Jeff Mahoney Change-Id: I6d11894e163f213ee53c007c0e41a374fccb70f9 Reviewed-on: http://review.whamcloud.com/5367 Reviewed-by: Bob Glossman Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 63 ---------------------------------- lustre/include/linux/lustre_compat25.h | 45 ------------------------ 2 files changed, 108 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 0950ea8..368df37 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -418,42 +418,6 @@ LB_LINUX_TRY_COMPILE([ ]) ]) -# 2.6.27 use 5th parameter in quota_on for remount. -AC_DEFUN([LC_QUOTA_ON_5ARGS], -[AC_MSG_CHECKING([quota_on needs 5 parameters]) -LB_LINUX_TRY_COMPILE([ - #include - #include -],[ - struct quotactl_ops *qop = NULL; - qop->quota_on(NULL, 0, 0, NULL, 0); -],[ - AC_DEFINE(HAVE_QUOTA_ON_5ARGS, 1, - [quota_on needs 5 paramters]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# 2.6.27 use 3th parameter in quota_off for remount. -AC_DEFUN([LC_QUOTA_OFF_3ARGS], -[AC_MSG_CHECKING([quota_off needs 3 parameters]) -LB_LINUX_TRY_COMPILE([ - #include - #include -],[ - struct quotactl_ops *qop = NULL; - qop->quota_off(NULL, 0, 0); -],[ - AC_DEFINE(HAVE_QUOTA_OFF_3ARGS, 1, - [quota_off needs 3 paramters]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - # 2.6.34 has quotactl_ops->[sg]et_dqblk that take struct fs_disk_quota AC_DEFUN([LC_HAVE_DQUOT_FS_DISK_QUOTA], tmp_flags="$EXTRA_KCFLAGS" @@ -759,28 +723,6 @@ AC_DEFINE(HAVE_BLKDEV_GET_BY_DEV, 1, ]) # -# 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.38 export simple_setattr # AC_DEFUN([LC_EXPORT_SIMPLE_SETATTR], @@ -1383,10 +1325,6 @@ AC_DEFUN([LC_PROG_LINUX], LC_BIO_ENDIO_2ARG LC_PROCFS_DELETED - # 2.6.27 - LC_QUOTA_ON_5ARGS - LC_QUOTA_OFF_3ARGS - # 2.6.27.15-2 sles11 LC_BI_HW_SEGMENTS LC_HAVE_QUOTAIO_H @@ -1413,7 +1351,6 @@ AC_DEFUN([LC_PROG_LINUX], # 2.6.38 LC_BLKDEV_GET_BY_DEV LC_GENERIC_PERMISSION - LC_QUOTA_ON_USE_PATH LC_DCACHE_LOCK LC_INODE_I_RCU LC_D_COMPARE_7ARGS diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index c23e559..9759a26 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -241,51 +241,6 @@ unsigned int ll_crypto_tfm_alg_min_keysize(struct crypto_blkcipher *tfm) #define SLAB_DESTROY_BY_RCU 0 #endif -static inline int -ll_quota_on(struct super_block *sb, int off, int ver, char *name, int remount) -{ - int rc; - - if (sb->s_qcop->quota_on) { -#ifdef HAVE_QUOTA_ON_USE_PATH - struct path path; - - rc = kern_path(name, LOOKUP_FOLLOW, &path); - if (!rc) - return rc; -#endif - rc = sb->s_qcop->quota_on(sb, off, ver -#ifdef HAVE_QUOTA_ON_USE_PATH - , &path -#else - , name -#endif -#ifdef HAVE_QUOTA_ON_5ARGS - , remount -#endif - ); -#ifdef HAVE_QUOTA_ON_USE_PATH - path_put(&path); -#endif - return rc; - } - else - return -ENOSYS; -} - -static inline int ll_quota_off(struct super_block *sb, int off, int remount) -{ - if (sb->s_qcop->quota_off) { - return sb->s_qcop->quota_off(sb, off -#ifdef HAVE_QUOTA_OFF_3ARGS - , remount -#endif - ); - } - else - return -ENOSYS; -} - #ifndef HAVE_DQUOT_SUSPEND # define ll_vfs_dq_init vfs_dq_init # define ll_vfs_dq_drop vfs_dq_drop -- 1.8.3.1