[XFS] Sleeping with the ilock waiting for I/O completion is Bad.
authorDavid Chinner <dgc@sgi.com>
Mon, 14 May 2007 08:24:09 +0000 (18:24 +1000)
committerTim Shimmin <tes@chook.melbourne.sgi.com>
Sat, 14 Jul 2007 05:22:18 +0000 (15:22 +1000)
commit40095b64f5da601a8ab61fbe4b40feb46830052e
tree114402c9280f5677bf1d47f4a933847912e3c314
parent4cc929ee305c69573cb842aade059dbe2a93940c
[XFS] Sleeping with the ilock waiting for I/O completion is Bad.

Recent fixes to the filesystem freezing code introduced a vn_iowait call
in the middle of the sync code. Unfortunately, at the point where this
call was added we are holding the ilock. The ilock is needed by I/O
completion for unwritten extent conversion and now updating the file size.
Hence I/o cannot complete if we hold the ilock while waiting for I/O
completion.

Fix up the bug and clean the code up around it.

SGI-PV: 963674
SGI-Modid: xfs-linux-melb:xfs-kern:28566a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/xfs_vfsops.c