From: shadow Date: Thu, 15 Feb 2007 12:38:18 +0000 (+0000) Subject: Remove old rdonly API which unsed from at least lustre 1.4.3 X-Git-Tag: v1_7_100~338 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=3886070b438cd45680789ee2f573ffd0f006ea3d Remove old rdonly API which unsed from at least lustre 1.4.3 b=11248 r=adilger --- diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 8fee9dd..5c19109 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -207,6 +207,12 @@ Details : for a short time RPCs with bulk IO are in the replay list, started it is possible to trip an assertion. Avoid putting committed RPCs into the replay list at all to avoid this issue. +Severity : minor +Frequency : only for kernels with patches from Lustre below 1.4.3 +Bugzilla : 11248 +Description: Remove old rdonly API +Details : Remove old rdonly API which unsed from at least lustre 1.4.3 + ------------------------------------------------------------------------------ TBD Cluster File Systems, Inc. @@ -261,7 +267,7 @@ Bugzilla : 11669 Description: Crash on NFS re-export node Details : under very unusual load conditions an assertion is hit in ll_intent_file_open() - + ------------------------------------------------------------------------------ TBD Cluster File Systems, Inc. diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 37cf2fe..5efe0d4 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -284,18 +284,20 @@ fi # and can only set a single device to discard writes at one time # AC_DEFUN([LC_FUNC_DEV_SET_RDONLY], -[AC_MSG_CHECKING([if kernel has old single-device dev_set_rdonly]) -HAVE_OLD_DSR="`grep -c -s 'dev_set_rdonly.*no_write' $LINUX/drivers/block/ll_rw_blk.c`" -if test x$HAVE_OLD_DSR != "x1" ; then - HAVE_OLD_DSR="`grep -c -s 'dev_set_rdonly.*no_write' $LINUX/drivers/block/blkpg.c`" -fi -if test x$HAVE_OLD_DSR = "x1" ; then - AC_DEFINE(HAVE_OLD_DEV_SET_RDONLY, 1, - [kernel has old single-device dev_set_rdonly]) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi +[AC_MSG_CHECKING([if kernel has new dev_set_rdonly]) +LB_LINUX_TRY_COMPILE([ + #include +],[ + #ifndef HAVE_CLEAR_RDONLY_ON_PUT + #error needs to be patched by lustre kernel patches from Lustre version 1.4.3 or above. + #endif +],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_DEV_SET_RDONLY, 1, [kernel has new dev_set_rdonly]) +],[ + AC_MSG_RESULT([no, Linux kernel source needs to be patches by lustre +kernel patches from Lustre version 1.4.3 or above.]) +]) ]) # diff --git a/lustre/lvfs/lvfs_linux.c b/lustre/lvfs/lvfs_linux.c index df8e1d4..7dfcf16 100644 --- a/lustre/lvfs/lvfs_linux.c +++ b/lustre/lvfs/lvfs_linux.c @@ -459,21 +459,10 @@ int lvfs_check_rdonly(lvfs_sbdev_type dev) void lvfs_clear_rdonly(lvfs_sbdev_type dev) { -#ifndef HAVE_CLEAR_RDONLY_ON_PUT - CDEBUG(D_IOCTL | D_HA, "unset dev %lx rdonly\n", (long)dev); - if (lvfs_check_rdonly(dev)) { - lvfs_sbdev_sync(dev); -#ifdef HAVE_OLD_DEV_SET_RDONLY - dev_clear_rdonly(2); -#else - dev_clear_rdonly(dev); -#endif - } -#else CDEBUG(D_IOCTL | D_HA, "(will unset dev %lx rdonly on put)\n", (long)dev); -#endif } + EXPORT_SYMBOL(lvfs_set_rdonly); EXPORT_SYMBOL(lvfs_check_rdonly); EXPORT_SYMBOL(lvfs_clear_rdonly); diff --git a/lustre/obdclass/linux/linux-module.c b/lustre/obdclass/linux/linux-module.c index 58c53f3..3c8b2b4 100644 --- a/lustre/obdclass/linux/linux-module.c +++ b/lustre/obdclass/linux/linux-module.c @@ -441,7 +441,7 @@ int class_procfs_clean(void) * kernel patch */ #include #ifdef LUSTRE_KERNEL_VERSION -#define LUSTRE_MIN_VERSION 37 +#define LUSTRE_MIN_VERSION 45 #define LUSTRE_MAX_VERSION 47 #if (LUSTRE_KERNEL_VERSION < LUSTRE_MIN_VERSION) # error Cannot continue: Your Lustre kernel patch is older than the sources