[Cluster-devel] cluster/gfs-kernel/src/gfs ops_file.c

wcheng at sourceware.org wcheng at sourceware.org
Fri Nov 17 20:33:16 UTC 2006


CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	wcheng at sourceware.org	2006-11-17 20:33:16

Modified files:
	gfs-kernel/src/gfs: ops_file.c 

Log message:
	Bugzilla 216209: GFS has been splitting large writes into smaller atomic
	transactions. This would generate multiple aio completion calls (one
	for each transaction) that falsely notify application about data
	completion. Problem is reported by QA team while doing RHEL5 testing.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.16.2.14&r2=1.16.2.15

--- cluster/gfs-kernel/src/gfs/ops_file.c	2006/06/07 14:06:11	1.16.2.14
+++ cluster/gfs-kernel/src/gfs/ops_file.c	2006/11/17 20:33:15	1.16.2.15
@@ -709,6 +709,12 @@
 	if (alloc_required) {
 		set_bit(GFF_DID_DIRECT_ALLOC, &fp->f_flags);
 
+		/* for asynchronous IO, the buffer can not be splitted */
+		if (iocb) {
+			count = do_write_direct_alloc(file, buf, size, offset, iocb);
+			goto out_iocb_write;
+		}
+
 		/* split large writes into smaller atomic transactions */
 		while (size) {
 			s = gfs_tune_get(sdp, gt_max_atomic_write);
@@ -746,6 +752,7 @@
 		gfs_glock_dq_uninit(&t_gh);
 	}
 
+      out_iocb_write:
 	error = 0;
 
       out_gunlock:




More information about the Cluster-devel mailing list