Whamcloud - gitweb
Add two new failloc constants to test lockless IO. Only one of them in
authornikita <nikita>
Sat, 18 Oct 2008 15:27:57 +0000 (15:27 +0000)
committernikita <nikita>
Sat, 18 Oct 2008 15:27:57 +0000 (15:27 +0000)
implemented---another is checked in yet to be landed core CLIO code.
b=16450

lustre/ChangeLog
lustre/include/obd_support.h
lustre/ldlm/ldlm_extent.c

index 04c2402..8afb64c 100644 (file)
@@ -1471,6 +1471,13 @@ Details    : Augment ->do_{read,write}_lock() prototypes with a `role' parameter
             indicating lock ordering. Update mdd code to use new locking
             interface.
 
+Severity   : normal
+Bugzilla   : 16450
+Description: Introduce failloc constants for lockless IO tests.
+Details    : Add two new failloc constants to test lockless IO. Only one of
+            them in implemented---another is checked in yet to be landed
+            core CLIO code.
+
 --------------------------------------------------------------------------------
 
 2007-08-10         Cluster File Systems, Inc. <info@clusterfs.com>
index 7b5d777..78481ce 100644 (file)
@@ -254,6 +254,9 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type,
 #define OBD_FAIL_LDLM_CANCEL_BL_CB_RACE  0x314
 #define OBD_FAIL_LDLM_CP_CB_WAIT         0x315
 
+/* LOCKLESS IO */
+#define OBD_FAIL_LDLM_SET_CONTENTION     0x315
+
 #define OBD_FAIL_OSC                     0x400
 #define OBD_FAIL_OSC_BRW_READ_BULK       0x401
 #define OBD_FAIL_OSC_BRW_WRITE_BULK      0x402
@@ -268,6 +271,7 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type,
 #define OBD_FAIL_OSC_CONNECT_CKSUM       0x40b
 #define OBD_FAIL_OSC_CKSUM_ADLER_ONLY    0x40c
 #define OBD_FAIL_OSC_DIO_PAUSE           0x40d
+#define OBD_FAIL_OSC_OBJECT_CONTENTION   0x40e
 
 #define OBD_FAIL_PTLRPC                  0x500
 #define OBD_FAIL_PTLRPC_ACK              0x501
index 689f0a2..3b6543e 100644 (file)
@@ -284,6 +284,9 @@ static int ldlm_check_contention(struct ldlm_lock *lock, int contended_locks)
         struct ldlm_resource *res = lock->l_resource;
         cfs_time_t now = cfs_time_current();
 
+        if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_SET_CONTENTION))
+                return 1;
+
         CDEBUG(D_DLMTRACE, "contended locks = %d\n", contended_locks);
         if (contended_locks > res->lr_namespace->ns_contended_locks)
                 res->lr_contention_time = now;