X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fautoconf%2Flustre-core.m4;h=061d45768fed6f3eddc7fe079c3210738ee85523;hp=318118342145b6b1c693c14cd0d154ce42765ddf;hb=c65b502fe9feda61c7ad7137f5022c654c6ba501;hpb=d21876c689b7339132064a3fcc9defdb96dd8501;ds=sidebyside diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 3181183..061d457 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -104,24 +104,15 @@ AC_DEFUN([LC_LUSTRE_VERSION_H], # # LC_FUNC_DEV_SET_RDONLY # -# check for the old-style dev_set_rdonly which took an extra "devno" param -# and can only set a single device to discard writes at one time +# check whether dev_set_rdonly is exported. This is needed until we +# have another mechanism to fence IO from the underlying device. # AC_DEFUN([LC_FUNC_DEV_SET_RDONLY], -[AC_MSG_CHECKING([if kernel has new dev_set_rdonly]) -LB_LINUX_TRY_COMPILE([ - #include - #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]) +[LB_CHECK_SYMBOL_EXPORT([dev_set_rdonly], +[block/ll_rw_block.c,block/blk-core.c],[ + AC_DEFINE(HAVE_DEV_SET_RDONLY, 1, [kernel exports dev_set_rdonly]) ],[ - AC_MSG_ERROR([no, Linux kernel source needs to be patches by lustre -kernel patches from Lustre version 1.4.3 or above.]) + AC_MSG_WARN([kernel missing dev_set_rdonly patch for testing]) ]) ])