Whamcloud - gitweb
LU-7934 osp: fix tr->otr_next_id overflow
[fs/lustre-release.git] / lustre / include / obd_support.h
index f089bf3..a6a83d9 100644 (file)
@@ -250,6 +250,7 @@ extern char obd_jobid_var[];
 #define OBD_FAIL_MDS_LLOG_CREATE_FAILED2 0x15b
 #define OBD_FAIL_MDS_FLD_LOOKUP                        0x15c
 #define OBD_FAIL_MDS_INTENT_DELAY              0x160
+#define OBD_FAIL_MDS_TRACK_OVERFLOW     0x162
 
 /* layout lock */
 #define OBD_FAIL_MDS_NO_LL_GETATTR      0x170
@@ -749,7 +750,11 @@ do {                                                                             \
 
 #define OBD_ALLOC_LARGE(ptr, size)                                            \
 do {                                                                          \
-       OBD_ALLOC_GFP(ptr, size, GFP_NOFS | __GFP_NOWARN);                    \
+       /* LU-8196 - force large allocations to use vmalloc, not kmalloc */   \
+       if ((size) > KMALLOC_MAX_SIZE)                                          \
+               ptr = NULL;                                                   \
+       else                                                                  \
+               OBD_ALLOC_GFP(ptr, size, GFP_NOFS | __GFP_NOWARN);            \
        if (ptr == NULL)                                                      \
                 OBD_VMALLOC(ptr, size);                                       \
 } while (0)