From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH, RFC] xip: use i_mutex for xip_file_fault Date: Sat, 10 Sep 2011 16:56:39 +0100 Message-ID: <20110910155639.GY2203@ZenIV.linux.org.uk> References: <4E6B82DB.50803@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Linux FS Devel , Linux Kernel To: Marco Stornelli Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:35422 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751969Ab1IJP4l (ORCPT ); Sat, 10 Sep 2011 11:56:41 -0400 Content-Disposition: inline In-Reply-To: <4E6B82DB.50803@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Sep 10, 2011 at 05:31:39PM +0200, Marco Stornelli wrote: > From: Marco Stornelli > > There aren't sufficient sync points for a fs for xip operations. In > particular for the mmap case. It can be not sufficient to lock/unlock > to do some operation inside get_xip_mem callback. For xip_file_read > it's really easy to write a fs specific wrapper, xip_file_write hold > i_mutex so no problem. With this patch we can avoid concurrent truncate > operation and xip mmap. Umm... I really don't like that; what's going to happen if you have a file mmapped and do write() to that file from address in that mapping?