])
#
+# LC_CONFIG_HEALTH_CHECK_WRITE
+#
+# Turn off the actual write to the disk
+#
+AC_DEFUN([LC_CONFIG_HEALTH_CHECK_WRITE],
+[AC_MSG_CHECKING([whether to enable a write with the health check])
+AC_ARG_ENABLE([health_write],
+ AC_HELP_STRING([--disable-health_write],
+ [disable disk writes when doing health check]),
+ [],[enable_health_write='yes'])
+AC_MSG_RESULT([$enable_health_write])
+if test x$enable_health_write != xno ; then
+ AC_DEFINE(USE_HEALTH_CHECK_WRITE, 1, Write when Checking Health)
+fi
+])
+
+#
# LC_CONFIG_LIBLUSTRE_RECOVERY
#
AC_DEFUN([LC_CONFIG_LIBLUSTRE_RECOVERY],
LC_CONFIG_PINGER
LC_CONFIG_LIBLUSTRE_RECOVERY
LC_CONFIG_QUOTA
+LC_CONFIG_HEALTH_CHECK_WRITE
LC_TASK_PPTR
static int mds_health_check(struct obd_device *obd)
{
struct obd_device_target *odt = &obd->u.obt;
+#ifdef USE_HEALTH_CHECK_WRITE
struct mds_obd *mds = &obd->u.mds;
+#endif
int rc = 0;
if (odt->obt_sb->s_flags & MS_RDONLY)
rc = 1;
+#ifdef USE_HEALTH_CHECK_WRITE
LASSERT(mds->mds_health_check_filp != NULL);
rc |= !!lvfs_check_io_health(obd, mds->mds_health_check_filp);
+#endif
return rc;
}
static int filter_health_check(struct obd_device *obd)
{
+#ifdef USE_HEALTH_CHECK_WRITE
struct filter_obd *filter = &obd->u.filter;
+#endif
int rc = 0;
/*
if (obd->u.obt.obt_sb->s_flags & MS_RDONLY)
rc = 1;
+#ifdef USE_HEALTH_CHECK_WRITE
LASSERT(filter->fo_health_check_filp != NULL);
rc |= !!lvfs_check_io_health(obd, filter->fo_health_check_filp);
+#endif
return rc;
}