From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: inode_dio_wait and hole-punch? Date: Tue, 15 May 2012 00:42:09 +0200 Message-ID: <20120514224209.GX5353@quack.suse.cz> 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 cantor2.suse.de ([195.135.220.15]:35310 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932599Ab2ENWmY (ORCPT ); Mon, 14 May 2012 18:42:24 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun 13-05-12 14:26:40, 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? Not necessarily before truncating page cache AFAICS but certainly before we go and remove blocks from the file. In case of ext4 doing that before ext4_flush_completed_IO() call would look most appropriate I'd think. Good spotting! Will you send a patch? Honza -- Jan Kara SUSE Labs, CR