From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 0/2] splice: i_mutex vs splice write deadlock V2 Date: Wed, 10 Aug 2011 06:19:21 -0400 Message-ID: <20110810101921.GD27114@infradead.org> References: <1312785927-10662-1-git-send-email-david@fromorbit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org, mfasheh@suse.com, jlbec@evilplan.org To: Dave Chinner Return-path: Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:58180 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751144Ab1HJKTY (ORCPT ); Wed, 10 Aug 2011 06:19:24 -0400 Content-Disposition: inline In-Reply-To: <1312785927-10662-1-git-send-email-david@fromorbit.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Aug 08, 2011 at 04:45:25PM +1000, Dave Chinner wrote: > generic_file_splice_write() takes the inode->i_mutex after the > filesystem has taken whatever locks it needs to ensure sanity. > however, this typically violates the locking order of filesystems > with their own locks in that the order is usually i_mutex -> > filesystem lock. > > XFS is such a case, and generic_file_splice_write() is generating > lockdep warnings because of lock inversions between the > inode->i_mutex and the XFS_I(inode)->i_iolock. There is also a > reported case of fio causing a deadlock when it mixes IO types > (e.g. splice vs direct IO). Another case is ocfs2, which looks like a perfect candidate to be converted over to your infrastructure.