[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	rpeterso sourceware org	2006-07-14 18:44:43

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

Log message:
	This is a bug fix for bz 164499.  It allows loopback-mounted files
	within a gfs file system.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_address.c.diff?cvsroot=cluster&r1=1.11&r2=1.12

--- cluster/gfs-kernel/src/gfs/ops_address.c	2006/07/10 23:22:34	1.11
+++ cluster/gfs-kernel/src/gfs/ops_address.c	2006/07/14 18:44:42	1.12
@@ -32,6 +32,8 @@
 #include "quota.h"
 #include "trans.h"
 
+static int gfs_commit_write(struct file *file, struct page *page,
+							unsigned from, unsigned to);
 /**
  * get_block - Fills in a buffer head with details about a block
  * @inode: The inode
@@ -320,6 +322,13 @@
 
 	atomic_inc(&sdp->sd_ops_address);
 
+	/* We can't set commit_write in the structure in the declare         */
+	/* because if we do, loopback (loop.c) will interpret that to mean   */
+	/* it's okay to do buffered writes without locking through sendfile. */
+	/* This is a kludge to get around the problem with loop.c because    */
+	/* the upstream community rejected my changes to loop.c.             */
+	gfs_file_aops.commit_write = gfs_commit_write;
+
 	if (gfs_assert_warn(sdp, gfs_glock_is_locked_by_me(ip->i_gl)))
 		return -ENOSYS;
 
@@ -466,7 +475,6 @@
 	.readpage = gfs_readpage,
 	.sync_page = block_sync_page,
 	.prepare_write = gfs_prepare_write,
-	.commit_write = gfs_commit_write,
 	.bmap = gfs_bmap,
 	.direct_IO = gfs_direct_IO,
 };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]