diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-12-14 18:24:26 +0000 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2007-02-05 13:36:09 -0500 |
commit | c7b3383437ff41781964d1bf7f40ff8d7dd5bc47 (patch) | |
tree | dbe0e6cb267bfe1dc5f52ee6c30529b55ac58a16 /arch/arm/mach-omap1/board-fsample.c | |
parent | 927255f0383342f5d49b82adb6689b9cba52a6f5 (diff) |
[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>
Diffstat (limited to 'arch/arm/mach-omap1/board-fsample.c')
0 files changed, 0 insertions, 0 deletions