From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: inode_dio_wait and hole-punch? Date: Tue, 15 May 2012 02:59:44 -0400 Message-ID: <20120515065944.GC7373@infradead.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org To: Hugh Dickins Return-path: Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:36794 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755718Ab2EOG7o (ORCPT ); Tue, 15 May 2012 02:59:44 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, May 13, 2012 at 02:26:40PM -0700, Hugh Dickins wrote: > In looking through hole-punching implementations, I got the impression > that perhaps ext4 and ocfs2 might need to inode_dio_wait() before they > truncate pagecache. And that might require ext4 to hold i_mutex there? Anything freeing blocks should be protected by inode_dio_wait, and any call to it needs i_mutex or equivalent protection against starting new direct I/O.