original_kernel/fs/gfs2
Benjamin Marzinski b524fe646c [GFS2] flush the glock completely in inode_go_sync
Fix for bz #231910
When filemap_fdatawrite() is called on the inode mapping in data=ordered mode,
it will add the glock to the log. In inode_go_sync(), if you do the
gfs2_log_flush() before this, after the filemap_fdatawrite() call, the glock
and its associated data buffers will be on the log again. This means you can
demote a lock from exclusive, without having it flushed from the log. The
attached patch simply moves the gfs2_log_flush up to after the
filemap_fdatawrite() call.

Originally, I tried moving the gfs2_log_flush to after gfs2_meta_sync(), but
that caused me to trip the following assert.

GFS2: fsid=cypher-36:test.0: fatal: assertion "!buffer_busy(bh)" failed
GFS2: fsid=cypher-36:test.0:   function = gfs2_ail_empty_gl, file = fs/gfs2/glops.c, line = 61

It appears that gfs2_log_flush() puts some of the glocks buffers in the busy
state and the filemap_fdatawrite() call is necessary to flush them. This makes
me worry slightly that a related problem could happen because of moving the
gfs2_log_flush() after the initial filemap_fdatawrite(), but I assume that
gfs2_ail_empty_gl() would catch that case as well.

Signed-off-by: Benjamin E. Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2007-07-09 08:22:07 +01:00
..
locking header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
Kconfig
Makefile
acl.c
acl.h
bmap.c
bmap.h
daemon.c
daemon.h
dir.c [GFS2] printk warning fixes 2007-05-01 09:11:48 +01:00
dir.h
eaops.c
eaops.h
eattr.c
eattr.h
gfs2.h
glock.c [GFS2] Uncomment sprintf_symbol calling code 2007-05-01 09:51:39 +01:00
glock.h Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
glops.c [GFS2] flush the glock completely in inode_go_sync 2007-07-09 08:22:07 +01:00
glops.h
incore.h [GFS2] lockdump improvements 2007-05-01 09:11:33 +01:00
inode.c
inode.h
lm.c
lm.h
locking.c
log.c
log.h
lops.c [GFS2] Fix log entry list corruption 2007-05-01 09:10:50 +01:00
lops.h
main.c Remove SLAB_CTOR_CONSTRUCTOR 2007-05-17 05:23:04 -07:00
meta_io.c
meta_io.h
mount.c [GFS2] use lib/parser for parsing mount options 2007-05-01 09:11:43 +01:00
mount.h
ondisk.c
ops_address.c [GFS2] Patch to fix mmap of stuffed files 2007-05-01 09:11:46 +01:00
ops_address.h
ops_dentry.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
ops_dentry.h
ops_export.c
ops_export.h
ops_file.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
ops_file.h
ops_fstype.c [GFS2] lockdump improvements 2007-05-01 09:11:33 +01:00
ops_fstype.h
ops_inode.c
ops_inode.h
ops_super.c [GFS2] Fix bz 224480 and cleanup glock demotion code 2007-05-01 09:10:39 +01:00
ops_super.h
ops_vm.c
ops_vm.h
quota.c
quota.h
recovery.c
recovery.h
rgrp.c [GFS2] Fix bz 234168 (ignoring rgrp flags) 2007-05-01 09:11:17 +01:00
rgrp.h
super.c
super.h
sys.c remove "struct subsystem" as it is no longer needed 2007-05-02 18:57:59 -07:00
sys.h
trans.c
trans.h
util.c
util.h