cluster/gfs-kernel/src/gfs incore.h inode.c op ...
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rpeterso at sourceware.org 2006-08-02 17:21:20
Modified files:
gfs-kernel/src/gfs: incore.h inode.c ops_address.c
Log message:
This is a fix for bugzilla bz 164499 (Unable to mount loopback images from mounted GFS partition). The previous fix had a problem where any writes to files in the file system would cause the problem to reappear. For more details see:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=164499
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/incore.h.diff?cvsroot=cluster&r1=1.25&r2=1.26
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/inode.c.diff?cvsroot=cluster&r1=1.24&r2=1.25
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_address.c.diff?cvsroot=cluster&r1=1.12&r2=1.13
gfs-kernel/src/gfs/incore.h +1 -0
@@ -617,6 +617,7 @@unsigned int i_greedy;/* The amount of time to be greedy */ unsigned long i_last_pfault;/* The time of the last page fault */ +struct address_space_operations gfs_file_aops; };/*
gfs-kernel/src/gfs/inode.c +3 -1
@@ -191,7 +191,9 @@if (ip->i_di.di_type ==GFS_FILE_REG ) { tmp->i_op = &gfs_file_iops; tmp->i_fop = &gfs_file_fops; - tmp->i_mapping->a_ops = &gfs_file_aops; +memcpy (&ip->gfs_file_aops, &gfs_file_aops, +sizeof (struct address_space_operations )); + tmp->i_mapping->a_ops = &ip->gfs_file_aops; }else if (ip->i_di.di_type ==GFS_FILE_DIR ) { tmp->i_op = &gfs_dir_iops; tmp->i_fop = &gfs_dir_fops;
gfs-kernel/src/gfs/ops_address.c +2 -1
@@ -327,7 +327,7 @@/* 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; + ip->gfs_file_aops.commit_write = gfs_commit_write;if (gfs_assert_warn (sdp,gfs_glock_is_locked_by_me (ip->i_gl)))return -ENOSYS ;
@@ -397,6 +397,7 @@ goto fail; } + ip->gfs_file_aops.commit_write =NULL ;return 0 ; fail: