]> git.karo-electronics.de Git - karo-tx-linux.git/commit
GFS2: Wait for async DIO in glock state changes
authorSteven Whitehouse <swhiteho@redhat.com>
Thu, 19 Dec 2013 11:04:14 +0000 (11:04 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 20 Dec 2013 10:42:08 +0000 (10:42 +0000)
commit582d2f7aedfde9e1a01170deb003df510aa778d3
treeb664990ee66d1e3ca792848e71b05c670379b4ed
parentdfd11184d894cd0a92397b25cac18831a1a6a5bc
GFS2: Wait for async DIO in glock state changes

We need to wait for any outstanding DIO to complete in a couple
of situations. Firstly, in case we are changing out of deferred
mode (in inode_go_sync) where GLF_DIRTY will not be set. That
call could be prefixed with a test for gl_state == LM_ST_DEFERRED
but it doesn't seem worth it bearing in mind that the test for
outstanding DIO is very quick anyway, in the usual case that there
is none.

The second case is in inode_go_lock which will catch the cases
where we have a cached EX lock, but where we grant deferred locks
against it so that there is no glock state transistion. We only
need to wait if the state is not deferred, since DIO is valid
anyway in that state.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/glops.c