linux/fs/gfs2
Steven Whitehouse c7b3383437 [GFS2] Fix DIO deadlock
This patch fixes Red Hat bugzilla #212627 in which a deadlock occurs
due to trying to take the i_mutex while holding a glock. The correct
locking order is defined as i_mutex -> glock in all cases.

I've left dealing with allocating writes. I know that we need to do
that, but for now this should do the trick. We don't need to take the
i_mutex on write, because the VFS has already taken it for us. On read
we don't need it since the glock is enough protection. The reason that
I've made some of the checks into a separate function is that we'll need
to do the checks again in the allocating write case eventually, so this
is partly in preparation for this. Likewise the return value test of !=
1 might look a bit odd and thats because we'll need a third return value
in case of requiring an allocation.

I've made the change to deferred mode on the glock to ensure flushing
read caches on other nodes. I notice that (using blktrace to look at
whats going on) we appear to do a better job of large I/Os than ext3
after this patch (in terms of not splitting up the I/Os).

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Wendy Cheng <wcheng@redhat.com>
2007-02-05 13:36:09 -05:00
..
locking [PATCH] severing skbuff.h -> poll.h 2006-12-04 02:00:31 -05:00
acl.c [GFS2] Remove gfs2_check_acl() 2006-11-30 10:37:32 -05:00
acl.h [GFS2] Remove gfs2_check_acl() 2006-11-30 10:37:32 -05:00
bmap.c [GFS2] Tidy up bmap & fix boundary bug 2006-11-30 10:35:49 -05:00
bmap.h [GFS2] Fix bmap to map extents properly 2006-10-20 09:13:40 -04:00
daemon.c [GFS2] Fix journal flush problem 2006-11-30 10:36:42 -05:00
daemon.h [GFS2] Update copyright, tidy up incore.h 2006-09-01 11:05:15 -04:00
dir.c [GFS2] Make sentinel dirents compatible with gfs1 2006-11-30 10:36:20 -05:00
dir.h [GFS2] split and annotate gfs2_inum 2006-11-30 10:33:32 -05:00
eaops.c [GFS2] Shrink gfs2_inode (3) - di_mode 2006-11-30 10:34:14 -05:00
eaops.h [GFS2] Extended attribute code style changes 2006-09-05 13:15:18 -04:00
eattr.c [GFS2] Remove gfs2_inode_attr_in 2006-11-30 10:34:52 -05:00
eattr.h [GFS2] gfs2 misc endianness annotations 2006-11-30 10:33:46 -05:00
gfs2.h [GFS2] Update copyright, tidy up incore.h 2006-09-01 11:05:15 -04:00
glock.c Merge master.kernel.org:/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw 2006-12-07 09:13:20 -08:00
glock.h [GFS2] Fix journal flush problem 2006-11-30 10:36:42 -05:00
glops.c [GFS2] Fix journal flush problem 2006-11-30 10:36:42 -05:00
glops.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
incore.h [GFS2] Simplify glops functions 2006-11-30 10:36:30 -05:00
inode.c [GFS2] Fix glock ordering on inode creation 2006-11-30 10:36:33 -05:00
inode.h [GFS2] Remove unused function from inode.c 2006-11-30 10:35:57 -05:00
Kconfig [GFS2] Fix Kconfig 2006-12-15 12:51:51 -05:00
lm.c [GFS2] don't try to lockfs after shutdown 2007-02-05 13:35:44 -05:00
lm.h [GFS2] Use void * instead of typedef for locking module interface 2006-09-08 10:17:58 -04:00
locking.c [GFS2] Export lm_interface to kernel headers 2006-09-19 08:45:18 -04:00
log.c [GFS2] fs/gfs2/log.c:log_bmap() fix printk format warning 2006-11-30 10:37:04 -05:00
log.h [GFS2] Move gfs2_meta_syncfs() into log.c 2006-11-30 10:36:45 -05:00
lops.c [GFS2] Fix race in logging code 2006-11-30 10:34:55 -05:00
lops.h [GFS2] split and annotate gfs2_log_head 2006-11-30 10:33:14 -05:00
main.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
Makefile [GFS2] Update copyright, tidy up incore.h 2006-09-01 11:05:15 -04:00
meta_io.c [GFS2] Reduce number of arguments to meta_io.c:getbuf() 2006-11-30 10:36:50 -05:00
meta_io.h [GFS2] Move gfs2_meta_syncfs() into log.c 2006-11-30 10:36:45 -05:00
mount.c [GFS2] Export lm_interface to kernel headers 2006-09-19 08:45:18 -04:00
mount.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
ondisk.c [GFS2] Don't copy meta_header for rgrp in and out 2006-11-30 10:34:36 -05:00
ops_address.c [GFS2] Fix DIO deadlock 2007-02-05 13:36:09 -05:00
ops_address.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
ops_dentry.c [GFS2] Shrink gfs2_inode (3) - di_mode 2006-11-30 10:34:14 -05:00
ops_dentry.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
ops_export.c [GFS2] gfs2 misc endianness annotations 2006-11-30 10:33:46 -05:00
ops_export.h [GFS2] split and annotate gfs2_inum 2006-11-30 10:33:32 -05:00
ops_file.c [PATCH] struct path: convert gfs2 2006-12-08 08:28:45 -08:00
ops_file.h [GFS2] Only set inode flags when required 2006-11-30 10:34:45 -05:00
ops_fstype.c [PATCH] Revert bd_mount_mutex back to a semaphore 2007-01-11 18:18:21 -08:00
ops_fstype.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
ops_inode.c [GFS2] Remove gfs2_check_acl() 2006-11-30 10:37:32 -05:00
ops_inode.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
ops_super.c [GFS2] don't try to lockfs after shutdown 2007-02-05 13:35:44 -05:00
ops_super.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
ops_vm.c [GFS2] Shrink gfs2_inode (4) - di_uid/di_gid 2006-11-30 10:34:17 -05:00
ops_vm.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
quota.c [GFS2] Shrink gfs2_inode (4) - di_uid/di_gid 2006-11-30 10:34:17 -05:00
quota.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
recovery.c [GFS2] Fix indent in recovery.c 2006-12-05 13:34:17 -05:00
recovery.h [GFS2] split and annotate gfs2_log_head 2006-11-30 10:33:14 -05:00
rgrp.c [GFS2] Shrink gfs2_inode (4) - di_uid/di_gid 2006-11-30 10:34:17 -05:00
rgrp.h [GFS2] Fix uninitialised variable 2006-10-12 17:10:15 -04:00
super.c [GFS2] Add a comment about reading the super block 2006-11-30 10:37:40 -05:00
super.h [GFS2] split and annotate gfs2_statfs_change 2006-11-30 10:33:38 -05:00
sys.c [GFS2] Remove unused sysfs files 2006-11-30 10:35:53 -05:00
sys.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
trans.c [GFS2] Export lm_interface to kernel headers 2006-09-19 08:45:18 -04:00
trans.h [GFS2] Make headers compile on their own 2006-09-05 10:39:21 -04:00
util.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
util.h Merge master.kernel.org:/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw 2006-12-07 09:13:20 -08:00