xfs
[Top] [All Lists]

TAKE 963674 - Don't hold ilock when calling vn_iowait.

To: xfs@xxxxxxxxxxx, sgi.bugs.xfs@xxxxxxxxxxxx
Subject: TAKE 963674 - Don't hold ilock when calling vn_iowait.
From: dgc@xxxxxxx (David Chinner)
Date: Fri, 11 May 2007 15:03:40 +1000 (EST)
Sender: xfs-bounce@xxxxxxxxxxx
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 hol dthe
ilock while waiting for I/O completion.

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

Date:  Fri May 11 15:02:29 AEST 2007
Workarea:  chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs
Inspected by:  hch@xxxxxxxxxxxxx,tes

The following file(s) were checked into:
  longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb


Modid:  xfs-linux-melb:xfs-kern:28566a
fs/xfs/xfs_vfsops.c - 1.519 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.519&r2=text&tr2=1.518&f=h
        - Drop the ilock before calling vn_iowait() when doing a SYNC_IOWAIT
          sync operation. Make the code easier to understand as well.



<Prev in Thread] Current Thread [Next in Thread>
  • TAKE 963674 - Don't hold ilock when calling vn_iowait., David Chinner <=