Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 1060

kernel-2.6.18-238.el5.src.rpm

From: Steven Whitehouse <swhiteho@redhat.com>
Date: Tue, 13 Apr 2010 08:28:20 -0400
Subject: [fs] gfs2: fix ordering of ordered writes
Message-id: <1271147300.2953.10.camel@localhost>
Patchwork-id: 24120
O-Subject: [RHEL5.6] GFS2: Fix ordering of ordered writes (bz #518013)
Bugzilla: 581013
RH-Acked-by: Robert S Peterson <rpeterso@redhat.com>
RH-Acked-by: David S. Miller <davem@redhat.com>

This is the RHEL5 version of bz #518011 and is identical to that and the
upstream patch modulo the starting offset of the patch. It corrects the
ordering of the ordered buffers and should improve stream write
performance in most cases.

Dave Chinner was the original author of this patch.

Signed-off-by: Jarod Wilson <jarod@redhat.com>

diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 20170eb..f2930bc 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -561,9 +561,9 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
 		gfs2_pin(sdp, bd->bd_bh);
 		tr->tr_num_databuf_new++;
 		sdp->sd_log_num_databuf++;
-		list_add(&le->le_list, &sdp->sd_log_le_databuf);
+		list_add_tail(&le->le_list, &sdp->sd_log_le_databuf);
 	} else {
-		list_add(&le->le_list, &sdp->sd_log_le_ordered);
+		list_add_tail(&le->le_list, &sdp->sd_log_le_ordered);
 	}
 out:
 	gfs2_log_unlock(sdp);