From caeac6b3959eeea7fe35e458b590aed748e94e0e Mon Sep 17 00:00:00 2001 From: adilger Date: Mon, 17 Nov 2003 19:26:28 +0000 Subject: [PATCH] Allow current b_devel to work with older (read LLNL) kernels until they are updated. Bumped LUSTRE_KERNEL_VERSION to 31 so we know which kernels have the required patches, but don't make it a hard requirement. b=1933 --- lnet/include/linux/kp30.h | 8 ++++++++ lustre/kernel_patches/patches/gfp_memalloc-2.4.18-chaos.patch | 2 +- lustre/kernel_patches/patches/gfp_memalloc-2.4.20-rh.patch | 2 +- lustre/kernel_patches/patches/gfp_memalloc-2.4.22.patch | 2 +- lustre/kernel_patches/patches/jbd-2.4.18-jcberr.patch | 8 -------- lustre/portals/include/linux/kp30.h | 8 ++++++++ 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/lnet/include/linux/kp30.h b/lnet/include/linux/kp30.h index 14be8aa..49f6d95 100644 --- a/lnet/include/linux/kp30.h +++ b/lnet/include/linux/kp30.h @@ -279,6 +279,10 @@ do { \ #define PORTAL_VMALLOC_SIZE 16384 +#ifndef GFP_MEMALLOC +#define GFP_MEMALLOC 0 +#endif + #define PORTAL_ALLOC(ptr, size) \ do { \ LASSERT (!in_interrupt()); \ @@ -314,6 +318,10 @@ do { \ s, (ptr), atomic_read(&portal_kmemory)); \ } while (0) +#ifndef SLAB_MEMALLOC +#define SLAB_MEMALLOC 0 +#endif + #define PORTAL_SLAB_ALLOC(ptr, slab, size) \ do { \ LASSERT(!in_interrupt()); \ diff --git a/lustre/kernel_patches/patches/gfp_memalloc-2.4.18-chaos.patch b/lustre/kernel_patches/patches/gfp_memalloc-2.4.18-chaos.patch index 9deb045..a8489e6 100644 --- a/lustre/kernel_patches/patches/gfp_memalloc-2.4.18-chaos.patch +++ b/lustre/kernel_patches/patches/gfp_memalloc-2.4.18-chaos.patch @@ -39,7 +39,7 @@ Index: linux-2.4.18-chaos/include/linux/slab.h #define SLAB_KERNEL GFP_KERNEL #define SLAB_NFS GFP_NFS #define SLAB_DMA GFP_DMA -+#define SLAB_MEMALLOC GFP_MEMALLOC ++#define SLAB_MEMALLOC GFP_MEMALLOC #define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_HIGHIO|__GFP_FS) #define SLAB_NO_GROW 0x00001000UL /* don't grow a cache */ diff --git a/lustre/kernel_patches/patches/gfp_memalloc-2.4.20-rh.patch b/lustre/kernel_patches/patches/gfp_memalloc-2.4.20-rh.patch index 947e1e4..3f37e44 100644 --- a/lustre/kernel_patches/patches/gfp_memalloc-2.4.20-rh.patch +++ b/lustre/kernel_patches/patches/gfp_memalloc-2.4.20-rh.patch @@ -40,7 +40,7 @@ Index: linux-2.4.20-rh-20.9/include/linux/slab.h #define SLAB_KERNEL GFP_KERNEL #define SLAB_NFS GFP_NFS #define SLAB_DMA GFP_DMA -+#define SLAB_MEMALLOC GFP_MEMALLOC ++#define SLAB_MEMALLOC GFP_MEMALLOC #define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_HIGHIO|__GFP_FS) #define SLAB_NO_GROW 0x00001000UL /* don't grow a cache */ diff --git a/lustre/kernel_patches/patches/gfp_memalloc-2.4.22.patch b/lustre/kernel_patches/patches/gfp_memalloc-2.4.22.patch index 74ce782..015bfc8 100644 --- a/lustre/kernel_patches/patches/gfp_memalloc-2.4.22.patch +++ b/lustre/kernel_patches/patches/gfp_memalloc-2.4.22.patch @@ -40,7 +40,7 @@ Index: linux-2.4.22-vanilla/include/linux/slab.h #define SLAB_KERNEL GFP_KERNEL #define SLAB_NFS GFP_NFS #define SLAB_DMA GFP_DMA -+#define SLAB_MEMALLOC GFP_MEMALLOC ++#define SLAB_MEMALLOC GFP_MEMALLOC #define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_HIGHIO|__GFP_FS) #define SLAB_NO_GROW 0x00001000UL /* don't grow a cache */ diff --git a/lustre/kernel_patches/patches/jbd-2.4.18-jcberr.patch b/lustre/kernel_patches/patches/jbd-2.4.18-jcberr.patch index fb9b543..81b4136 100644 --- a/lustre/kernel_patches/patches/jbd-2.4.18-jcberr.patch +++ b/lustre/kernel_patches/patches/jbd-2.4.18-jcberr.patch @@ -101,14 +101,6 @@ Index: linux-2.4.19.SuSE/fs/jbd/commit.c /* AKPM: buglet - add `i' to tmp! */ for (i = 0; i < jh2bh(descriptor)->b_size; i += 512) { journal_header_t *tmp = -@@ -600,6 +603,7 @@ - } - - unlock_journal(journal); -+ unlocked = 1; - JBUFFER_TRACE(descriptor, "write commit block"); - { - struct buffer_head *bh = jh2bh(descriptor); @@ -610,14 +614,32 @@ put_bh(bh); /* One for getblk() */ journal_unlock_journal_head(descriptor); diff --git a/lustre/portals/include/linux/kp30.h b/lustre/portals/include/linux/kp30.h index 14be8aa..49f6d95 100644 --- a/lustre/portals/include/linux/kp30.h +++ b/lustre/portals/include/linux/kp30.h @@ -279,6 +279,10 @@ do { \ #define PORTAL_VMALLOC_SIZE 16384 +#ifndef GFP_MEMALLOC +#define GFP_MEMALLOC 0 +#endif + #define PORTAL_ALLOC(ptr, size) \ do { \ LASSERT (!in_interrupt()); \ @@ -314,6 +318,10 @@ do { \ s, (ptr), atomic_read(&portal_kmemory)); \ } while (0) +#ifndef SLAB_MEMALLOC +#define SLAB_MEMALLOC 0 +#endif + #define PORTAL_SLAB_ALLOC(ptr, slab, size) \ do { \ LASSERT(!in_interrupt()); \ -- 1.8.3.1