Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757907Ab3GRARi (ORCPT ); Wed, 17 Jul 2013 20:17:38 -0400 Received: from mail-ve0-f174.google.com ([209.85.128.174]:45788 "EHLO mail-ve0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757807Ab3GRARh (ORCPT ); Wed, 17 Jul 2013 20:17:37 -0400 MIME-Version: 1.0 In-Reply-To: <20130717234049.GC3572@sgi.com> References: <20130716060351.GE11674@dastard> <20130716193332.GB3572@sgi.com> <20130716204335.GH11674@dastard> <20130717040616.GI11674@dastard> <20130717055103.GK11674@dastard> <20130717234049.GC3572@sgi.com> Date: Wed, 17 Jul 2013 17:17:36 -0700 X-Google-Sender-Auth: p9oBxSd30hGIUrJdx_nicD_D4SM Message-ID: Subject: Re: splice vs execve lockdep trace. From: Linus Torvalds To: Ben Myers Cc: Dave Chinner , Peter Zijlstra , Oleg Nesterov , Linux Kernel , Alexander Viro , Dave Jones , xfs@oss.sgi.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 825 Lines: 23 On Wed, Jul 17, 2013 at 4:40 PM, Ben Myers wrote: >> >> We're still talking at cross purposes then. >> >> How the hell do you handle mmap() and page faulting? > > __xfs_get_blocks serializes access to the block map with the i_lock on the > xfs_inode. This appears to be racy with respect to hole punching. Would it be possible to just make __xfs_get_blocks get the i_iolock (non-exclusively)? Or, alternatively, do it in the readpage() function? That was what I thought you did anyway. Exactly because of the whole page faulting issue. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/