rpms/kernel/FC-6 linux-2.6-gfs2-endian-bug.patch, NONE, 1.1 linux-2.6-gfs2-fixes.patch, NONE, 1.1 kernel-2.6.spec, 1.2784, 1.2785

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Oct 13 15:59:47 UTC 2006


Author: davej

Update of /cvs/dist/rpms/kernel/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv32083

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-gfs2-endian-bug.patch linux-2.6-gfs2-fixes.patch 
Log Message:
* Fri Oct 13 2006 Steven Whitehouse <swhiteho at redhat.com>
- Fix for bz 210493 gfs2 endian bug from upstream
- Fix for gfs2 performance problem
- Fix for a locking problem in gfs2
- Fix git tree location for gfs2



linux-2.6-gfs2-endian-bug.patch:
 ops_inode.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE linux-2.6-gfs2-endian-bug.patch ---
diff -Nru linux-2.6.18.orig/fs/gfs2/ops_inode.c linux-2.6.18/fs/gfs2/ops_inode.c
--- linux-2.6.18.orig/fs/gfs2/ops_inode.c	2006-10-13 16:24:23.000000000 +0100
+++ linux-2.6.18/fs/gfs2/ops_inode.c	2006-10-13 16:26:07.000000000 +0100
@@ -404,7 +404,7 @@
 		gfs2_trans_add_bh(ip->i_gl, dibh, 1);
 		gfs2_qstr2dirent(&str, GFS2_DIRENT_SIZE(str.len), dent);
 		dent->de_inum = di->di_num; /* already GFS2 endian */
-		dent->de_type = DT_DIR;
+		dent->de_type = cpu_to_be16(DT_DIR);
 		di->di_entries = cpu_to_be32(1);
 
 		gfs2_str2qstr(&str, "..");
@@ -412,7 +412,7 @@
 		gfs2_qstr2dirent(&str, dibh->b_size - GFS2_DIRENT_SIZE(1) - sizeof(struct gfs2_dinode), dent);
 
 		gfs2_inum_out(&dip->i_num, (char *) &dent->de_inum);
-		dent->de_type = DT_DIR;
+		dent->de_type = cpu_to_be16(DT_DIR);
 
 		gfs2_dinode_out(&ip->i_di, (char *)di);
 

linux-2.6-gfs2-fixes.patch:
 log.c         |    5 ++---
 ops_address.c |    7 +++++--
 rgrp.h        |    2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)

--- NEW FILE linux-2.6-gfs2-fixes.patch ---
diff -Nru linux-2.6.18.orig/fs/gfs2/log.c linux-2.6.18/fs/gfs2/log.c
--- linux-2.6.18.orig/fs/gfs2/log.c	2006-10-13 16:24:23.000000000 +0100
+++ linux-2.6.18/fs/gfs2/log.c	2006-10-13 16:32:43.000000000 +0100
@@ -460,16 +460,15 @@
 	else if (sdp->sd_log_tail != current_tail(sdp) && !sdp->sd_log_idle)
 		log_write_header(sdp, 0, PULL);
 	lops_after_commit(sdp, ai);
-	sdp->sd_log_head = sdp->sd_log_flush_head;
 
+	gfs2_log_lock(sdp);
+	sdp->sd_log_head = sdp->sd_log_flush_head;
 	sdp->sd_log_blks_free -= sdp->sd_log_num_hdrs;
-
 	sdp->sd_log_blks_reserved = 0;
 	sdp->sd_log_commited_buf = 0;
 	sdp->sd_log_num_hdrs = 0;
 	sdp->sd_log_commited_revoke = 0;
 
-	gfs2_log_lock(sdp);
 	if (!list_empty(&ai->ai_ail1_list)) {
 		list_add(&ai->ai_list, &sdp->sd_ail1_list);
 		ai = NULL;
diff -Nru linux-2.6.18.orig/fs/gfs2/ops_address.c linux-2.6.18/fs/gfs2/ops_address.c
--- linux-2.6.18.orig/fs/gfs2/ops_address.c	2006-10-13 16:24:23.000000000 +0100
+++ linux-2.6.18/fs/gfs2/ops_address.c	2006-10-13 16:32:22.000000000 +0100
@@ -370,19 +370,22 @@
 	loff_t pos = ((loff_t)page->index << PAGE_CACHE_SHIFT) + from;
 	loff_t end = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to;
 	struct gfs2_alloc *al;
+	unsigned int write_len = to - from;
+
 
 	gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_ATIME|GL_AOP, &ip->i_gh);
 	error = gfs2_glock_nq_m_atime(1, &ip->i_gh);
 	if (error)
 		goto out_uninit;
 
-	gfs2_write_calc_reserv(ip, to - from, &data_blocks, &ind_blocks);
+	gfs2_write_calc_reserv(ip, write_len, &data_blocks, &ind_blocks);
 
-	error = gfs2_write_alloc_required(ip, pos, from - to, &alloc_required);
+	error = gfs2_write_alloc_required(ip, pos, write_len, &alloc_required);
 	if (error)
 		goto out_unlock;
 
 
+	ip->i_alloc.al_requested = 0;
 	if (alloc_required) {
 		al = gfs2_alloc_get(ip);
 
diff -Nru linux-2.6.18.orig/fs/gfs2/rgrp.h linux-2.6.18/fs/gfs2/rgrp.h
--- linux-2.6.18.orig/fs/gfs2/rgrp.h	2006-10-13 16:24:23.000000000 +0100
+++ linux-2.6.18/fs/gfs2/rgrp.h	2006-10-13 16:32:22.000000000 +0100
@@ -32,7 +32,7 @@
 struct gfs2_alloc *gfs2_alloc_get(struct gfs2_inode *ip);
 static inline void gfs2_alloc_put(struct gfs2_inode *ip)
 {
-	return; /* Se we can see where ip->i_alloc is used */
+	return; /* So we can see where ip->i_alloc is used */
 }
 
 int gfs2_inplace_reserve_i(struct gfs2_inode *ip,


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-6/kernel-2.6.spec,v
retrieving revision 1.2784
retrieving revision 1.2785
diff -u -r1.2784 -r1.2785
--- kernel-2.6.spec	12 Oct 2006 22:37:23 -0000	1.2784
+++ kernel-2.6.spec	13 Oct 2006 15:59:45 -0000	1.2785
@@ -439,6 +439,8 @@
 Patch1410: linux-2.6-gfs2-dlm.patch
 Patch1411: linux-2.6-gfs2-tux.patch
 Patch1412: linux-2.6-gfs2-locking-exports.patch
+Patch1413: linux-2.6-gfs2-endian-bug.patch
+Patch1414: linux-2.6-gfs2-fixes.patch
 
 Patch1420: linux-2.6-inode_diet-replace-inodeugeneric_ip-with-inodei_private.patch
 Patch1421: linux-2.6-inode-diet-move-i_pipe-into-a-union.patch
@@ -1038,6 +1040,8 @@
 %patch1410 -p1
 %patch1411 -p1
 %patch1412 -p1
+%patch1413 -p1
+%patch1414 -p1
 # Ted's inode diet work.
 %patch1420 -p1
 %patch1421 -p1
@@ -2029,6 +2033,12 @@
 %endif
 
 %changelog
+* Fri Oct 13 2006 Steven Whitehouse <swhiteho at redhat.com>
+- Fix for bz 210493 gfs2 endian bug from upstream
+- Fix for gfs2 performance problem
+- Fix for a locking problem in gfs2
+- Fix git tree location for gfs2
+
 * Thu Oct 12 2006 Dave Jones <davej at redhat.com>
 - Fix unbalanced locking in decnet.
   (You know we're getting close to a release when I'm 




More information about the fedora-cvs-commits mailing list