SOURCES: kernel-fs-gfs-get_block.patch (NEW), kernel-fs-gfs-mutex....

adamg adamg at pld-linux.org
Sun Jun 25 18:23:08 CEST 2006


Author: adamg                        Date: Sun Jun 25 16:23:07 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new

---- Files affected:
SOURCES:
   kernel-fs-gfs-get_block.patch (NONE -> 1.1)  (NEW), kernel-fs-gfs-mutex.patch (NONE -> 1.1)  (NEW), kernel-fs-gfs-posix_test_lock.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/kernel-fs-gfs-get_block.patch
diff -u /dev/null SOURCES/kernel-fs-gfs-get_block.patch:1.1
--- /dev/null	Sun Jun 25 18:23:07 2006
+++ SOURCES/kernel-fs-gfs-get_block.patch	Sun Jun 25 18:23:02 2006
@@ -0,0 +1,22 @@
+--- cluster-1.02.00/gfs-kernel/src/gfs/ops_address.c.orig	2006-06-25 15:29:18.000000000 +0200
++++ cluster-1.02.00/gfs-kernel/src/gfs/ops_address.c	2006-06-25 15:30:06.000000000 +0200
+@@ -19,6 +19,7 @@
+ #include <linux/completion.h>
+ #include <linux/buffer_head.h>
+ #include <linux/pagemap.h>
++#include <linux/version.h>
+ 
+ #include "gfs.h"
+ #include "bmap.h"
+@@ -451,7 +452,11 @@
+ 	struct inode *inode = file->f_mapping->host;
+ 	struct gfs_inode *ip = get_v2ip(inode);
+ 	struct gfs_sbd *sdp = ip->i_sbd;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
++	get_block_t *gb = get_block;
++#else
+ 	get_blocks_t *gb = get_blocks;
++#endif
+ 
+ 	atomic_inc(&sdp->sd_ops_address);
+ 

================================================================
Index: SOURCES/kernel-fs-gfs-mutex.patch
diff -u /dev/null SOURCES/kernel-fs-gfs-mutex.patch:1.1
--- /dev/null	Sun Jun 25 18:23:07 2006
+++ SOURCES/kernel-fs-gfs-mutex.patch	Sun Jun 25 18:23:02 2006
@@ -0,0 +1,127 @@
+--- cluster-1.02.00/gfs-kernel/src/gfs/diaper.c~	2005-05-06 01:24:16.000000000 +0200
++++ cluster-1.02.00/gfs-kernel/src/gfs/diaper.c	2006-06-25 15:34:04.000000000 +0200
+@@ -22,6 +22,7 @@
+ #include <linux/blkdev.h>
+ #include <linux/idr.h>
+ #include <linux/mempool.h>
++#include <linux/version.h>
+ 
+ #include "gfs.h"
+ #include "diaper.h"
+@@ -232,9 +233,17 @@
+ 	struct inode *inode;
+ 	int error;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
++	mutex_lock(&real->bd_mount_mutex);
++#else
+ 	down(&real->bd_mount_sem);
++#endif
+ 	sb = sget(&gfs_fs_type, gfs_test_bdev_super, gfs_set_bdev_super, real);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
++	mutex_unlock(&real->bd_mount_mutex);
++#else
+ 	up(&real->bd_mount_sem);
++#endif
+ 	if (IS_ERR(sb))
+ 		return PTR_ERR(sb);
+ 
+@@ -362,8 +371,11 @@
+ 	diaper = bdget_disk(gd, 0);
+ 	if (!diaper)
+ 		goto fail_remove;
+-
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
++	mutex_lock(&diaper->bd_mutex);
++#else
+ 	down(&diaper->bd_sem);
++#endif
+ 	if (!diaper->bd_openers) {
+ 		diaper->bd_disk = gd;
+ 		diaper->bd_contains = diaper;
+@@ -372,7 +384,11 @@
+ 	} else
+ 		printk("GFS: diaper: reopening\n");
+ 	diaper->bd_openers++;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
++	mutex_unlock(&diaper->bd_mutex);
++#else
+ 	up(&diaper->bd_sem);
++#endif
+ 
+ 	dh->dh_mempool = mempool_create(512,
+ 					mempool_alloc_slab, mempool_free_slab,
+@@ -395,14 +411,22 @@
+ 	mempool_destroy(dh->dh_mempool);
+ 
+  fail_bdput:
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
++	mutex_lock(&diaper->bd_mutex);
++#else
+ 	down(&diaper->bd_sem);
++#endif
+ 	if (!--diaper->bd_openers) {
+ 		invalidate_bdev(diaper, 1);
+ 		diaper->bd_contains = NULL;
+ 		diaper->bd_disk = NULL;
+ 	} else
+ 		printk("GFS: diaper: not closed\n");
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
++	mutex_unlock(&diaper->bd_mutex);
++#else
+ 	up(&diaper->bd_sem);
++#endif
+ 	bdput(diaper);	
+ 
+  fail_remove:
+@@ -437,14 +461,22 @@
+ 
+ 	mempool_destroy(dh->dh_mempool);
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
++	mutex_lock(&diaper->bd_mutex);
++#else
+ 	down(&diaper->bd_sem);
++#endif
+ 	if (!--diaper->bd_openers) {
+ 		invalidate_bdev(diaper, 1);
+ 		diaper->bd_contains = NULL;
+ 		diaper->bd_disk = NULL;
+ 	} else
+ 		printk("GFS: diaper: not closed\n");
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
++	mutex_unlock(&diaper->bd_mutex);
++#else
+ 	up(&diaper->bd_sem);
++#endif
+ 
+ 	bdput(diaper);
+ 	del_gendisk(gd);
+--- cluster-1.02.00/gfs-kernel/src/gfs/ops_fstype.c.orig	2006-06-25 15:47:24.000000000 +0200
++++ cluster-1.02.00/gfs-kernel/src/gfs/ops_fstype.c	2006-06-25 15:48:52.000000000 +0200
+@@ -20,6 +20,7 @@
+ #include <linux/buffer_head.h>
+ #include <linux/vmalloc.h>
+ #include <linux/blkdev.h>
++#include <linux/version.h>
+ 
+ #include "gfs.h"
+ #include "daemon.h"
+@@ -697,9 +698,17 @@
+ 		return (struct super_block *)diaper;
+ 	}
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
++	mutex_lock(&diaper->bd_mount_mutex);
++#else
+ 	down(&diaper->bd_mount_sem);
++#endif
+ 	sb = sget(fs_type, gfs_test_bdev_super, gfs_set_bdev_super, diaper);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
++	mutex_unlock(&diaper->bd_mount_mutex);
++#else
+ 	up(&diaper->bd_mount_sem);
++#endif
+ 	if (IS_ERR(sb))
+ 		goto out;
+ 

================================================================
Index: SOURCES/kernel-fs-gfs-posix_test_lock.patch
diff -u /dev/null SOURCES/kernel-fs-gfs-posix_test_lock.patch:1.1
--- /dev/null	Sun Jun 25 18:23:08 2006
+++ SOURCES/kernel-fs-gfs-posix_test_lock.patch	Sun Jun 25 18:23:02 2006
@@ -0,0 +1,44 @@
+--- cluster-1.02.00/gfs-kernel/src/nolock/main.c~	2006-04-10 23:15:52.000000000 +0200
++++ cluster-1.02.00/gfs-kernel/src/nolock/main.c	2006-06-25 14:59:39.000000000 +0200
+@@ -19,6 +19,7 @@
+ #include <linux/fs.h>
+ #include <linux/smp_lock.h>
+ #include <linux/lm_interface.h>
++#include <linux/version.h>
+ 
+ #define RELEASE_NAME "1.02.00"
+ 
+@@ -246,7 +246,11 @@
+ 	struct file_lock *tmp;
+ 
+ 	lock_kernel();
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
++	posix_test_lock(file, fl, tmp);
++#else
+ 	tmp = posix_test_lock(file, fl);
++#endif
+ 	fl->fl_type = F_UNLCK;
+ 	if (tmp)
+ 		memcpy(fl, tmp, sizeof(struct file_lock));
+--- cluster-1.02.00/gfs-kernel/src/gfs/ops_file.c.orig	2006-06-25 15:43:09.000000000 +0200
++++ cluster-1.02.00/gfs-kernel/src/gfs/ops_file.c	2006-06-25 15:44:19.000000000 +0200
+@@ -25,6 +25,7 @@
+ #include <linux/mm.h>
+ #include <asm/uaccess.h>
+ #include <linux/gfs_ioctl.h>
++#include <linux/version.h>
+ 
+ #include "gfs.h"
+ #include "bmap.h"
+@@ -1467,7 +1468,11 @@
+ 		if (IS_GETLK(cmd)) {
+ 			struct file_lock *tmp;
+ 			lock_kernel();
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
++			posix_test_lock(file, fl, tmp);
++#else
+ 			tmp = posix_test_lock(file, fl);
++#endif
+ 			fl->fl_type = F_UNLCK;
+ 			if (tmp)
+ 				memcpy(fl, tmp, sizeof(struct file_lock));
================================================================


More information about the pld-cvs-commit mailing list