X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mBO36jog002453 for ; Tue, 23 Dec 2008 21:06:46 -0600 Received: (from lachlan@localhost) by oss.sgi.com (8.12.11.20060308/8.12.11/Submit) id mBO36brP002420; Tue, 23 Dec 2008 21:06:37 -0600 Date: Tue, 23 Dec 2008 21:06:37 -0600 Message-Id: <200812240306.mBO36brP002420@oss.sgi.com> From: xfs@oss.sgi.com To: xfs@oss.sgi.com Subject: [XFS updates] XFS development tree branch, master, updated. v2.6.28-rc3-1829-g2505115 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: ad1ad968f4e7b06c75741575ea077e25a87da49a X-Git-Newrev: 25051158bbed127e8672b43396c71c5eb610e5f1 X-Virus-Scanned: ClamAV 0.91.2/8795/Tue Dec 23 11:58:21 2008 on oss.sgi.com X-Virus-Status: Clean This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "XFS development tree". The branch, master has been updated 2505115 [XFS] Fix race in xfs_write() between direct and buffered I/O with DMAPI from ad1ad968f4e7b06c75741575ea077e25a87da49a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 25051158bbed127e8672b43396c71c5eb610e5f1 Author: Lachlan McIlroy Date: Wed Dec 24 14:07:32 2008 +1100 [XFS] Fix race in xfs_write() between direct and buffered I/O with DMAPI The iolock is dropped and re-acquired around the call to XFS_SEND_NAMESP(). While the iolock is released the file can become cached. We then 'goto retry' and - if we are doing direct I/O - mapping->nrpages may now be non zero but need_i_mutex will be zero and we will hit the WARN_ON(). Since we have dropped the I/O lock then the file size may have also changed so what we need to do here is 'goto start' like we do for the XFS_SEND_DATA() DMAPI event. We also need to update the filesize before releasing the iolock so that needs to be done before the XFS_SEND_NAMESP event. If we drop the iolock before setting the filesize we could race with a truncate. Reviewed-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy ----------------------------------------------------------------------- Summary of changes: fs/xfs/linux-2.6/xfs_lrw.c | 27 ++++++++++++--------------- 1 files changed, 12 insertions(+), 15 deletions(-) hooks/post-receive -- XFS development tree