Whamcloud - gitweb
LU-5026 obdclass: Add lbug_on_eviction option 57/10257/13
authorRyan Haasken <haasken@cray.com>
Wed, 7 May 2014 21:33:24 +0000 (16:33 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 1 Oct 2018 14:00:11 +0000 (14:00 +0000)
Add an lbug_on_eviction sysfs interface.  When it is set to a non-zero
value on a client, it will cause the client to LBUG whenever it is
evicted by the server. Note, an MDS is a client to OSTs, and every
server is a client of MGS. Thus, it is probably desireable to leave
this set to zero on servers.

Change-Id: I2f694e4bc1b1ec9daf52f8a6ac46ad87f40f810f
Cray-bug-id: LUS-2591
Signed-off-by: Ryan Haasken <haasken@cray.com>
Signed-off-by: Chris Horn <hornc@cray.com>
Reviewed-on: https://review.whamcloud.com/10257
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd_support.h
lustre/obdclass/class_obd.c
lustre/obdclass/obd_sysfs.c
lustre/ptlrpc/import.c

index 265a3b8..60e6ac8 100644 (file)
@@ -53,6 +53,7 @@ enum {
 extern unsigned int obd_debug_peer_on_timeout;
 extern unsigned int obd_dump_on_timeout;
 extern unsigned int obd_dump_on_eviction;
+extern unsigned int obd_lbug_on_eviction;
 /* obd_timeout should only be used for recovery, not for
    networking / disk / timings affected by load (use Adaptive Timeouts) */
 extern unsigned int obd_timeout;          /* seconds */
index 9bb407c..d408915 100644 (file)
@@ -69,6 +69,8 @@ unsigned int obd_dump_on_timeout;
 EXPORT_SYMBOL(obd_dump_on_timeout);
 unsigned int obd_dump_on_eviction;
 EXPORT_SYMBOL(obd_dump_on_eviction);
+unsigned int obd_lbug_on_eviction;
+EXPORT_SYMBOL(obd_lbug_on_eviction);
 unsigned long obd_max_dirty_pages;
 EXPORT_SYMBOL(obd_max_dirty_pages);
 atomic_long_t obd_dirty_pages;
index 64ab464..a297e52 100644 (file)
@@ -121,6 +121,7 @@ LUSTRE_STATIC_UINT_ATTR(at_max, &at_max);
 LUSTRE_STATIC_UINT_ATTR(at_extra, &at_extra);
 LUSTRE_STATIC_UINT_ATTR(at_early_margin, &at_early_margin);
 LUSTRE_STATIC_UINT_ATTR(at_history, &at_history);
+LUSTRE_STATIC_UINT_ATTR(lbug_on_eviction, &obd_lbug_on_eviction);
 
 #ifdef HAVE_SERVER_SUPPORT
 LUSTRE_STATIC_UINT_ATTR(ldlm_timeout, &ldlm_timeout);
@@ -351,6 +352,7 @@ static struct attribute *lustre_attrs[] = {
        &lustre_sattr_ldlm_timeout.u.attr,
        &lustre_sattr_bulk_timeout.u.attr,
 #endif
+       &lustre_sattr_lbug_on_eviction.u.attr,
        NULL,
 };
 
index dd9ba73..241c1a7 100644 (file)
@@ -1461,6 +1461,7 @@ int ptlrpc_import_recovery_state_machine(struct obd_import *imp)
                                           "using this service will fail.\n",
                                           imp->imp_obd->obd_name, target_len,
                                           target_start);
+                       LASSERTF(!obd_lbug_on_eviction, "LBUG upon eviction");
                 }
                 CDEBUG(D_HA, "evicted from %s@%s; invalidating\n",
                        obd2cli_tgt(imp->imp_obd),