Whamcloud - gitweb
LU-7655 tests: ost fake write for performance testing
[fs/lustre-release.git] / lustre / include / obd_support.h
index a60467f..ee9d9ad 100644 (file)
@@ -327,6 +327,7 @@ extern char obd_jobid_var[];
 #define OBD_FAIL_OST_LADVISE_NET        0x235
 #define OBD_FAIL_OST_PAUSE_PUNCH         0x236
 #define OBD_FAIL_OST_LADVISE_PAUSE      0x237
+#define OBD_FAIL_OST_FAKE_WRITE          0x238
 
 #define OBD_FAIL_LDLM                    0x300
 #define OBD_FAIL_LDLM_NAMESPACE_NEW      0x301
@@ -370,6 +371,8 @@ extern char obd_jobid_var[];
 #define OBD_FAIL_LDLM_WATERMARK_LOW     0x327
 #define OBD_FAIL_LDLM_WATERMARK_HIGH    0x328
 
+#define OBD_FAIL_LDLM_GRANT_CHECK        0x32a
+
 /* LOCKLESS IO */
 #define OBD_FAIL_LDLM_SET_CONTENTION     0x385
 
@@ -623,6 +626,7 @@ extern char obd_jobid_var[];
 #define OBD_FAIL_DT_DECLARE_DELETE             0x2016
 #define OBD_FAIL_DT_DELETE                     0x2017
 #define OBD_FAIL_DT_LOOKUP                     0x2018
+#define OBD_FAIL_DT_TXN_STOP                   0x2019
 
 #define OBD_FAIL_OSP_CHECK_INVALID_REC         0x2100
 #define OBD_FAIL_OSP_CHECK_ENOMEM              0x2101
@@ -792,7 +796,7 @@ do {                                                                              \
 #endif
 
 #ifdef POISON_BULK
-#define POISON_PAGE(page, val) do { memset(kmap(page), val, PAGE_CACHE_SIZE); \
+#define POISON_PAGE(page, val) do { memset(kmap(page), val, PAGE_SIZE); \
                                     kunmap(page); } while (0)
 #else
 #define POISON_PAGE(page, val) do { } while (0)
@@ -885,4 +889,16 @@ do {                                                                          \
 #define KEY_IS(str) \
         (keylen >= (sizeof(str)-1) && memcmp(key, str, (sizeof(str)-1)) == 0)
 
+/* LUSTRE_LMA_FL_MASKS defines which flags will be stored in LMA */
+
+static inline int lma_to_lustre_flags(__u32 lma_flags)
+{
+       return (lma_flags & LMAI_ORPHAN) ? LUSTRE_ORPHAN_FL : 0;
+}
+
+static inline int lustre_to_lma_flags(__u32 la_flags)
+{
+       return (la_flags & LUSTRE_ORPHAN_FL) ? LMAI_ORPHAN : 0;
+}
+
 #endif