Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761169AbYGaA61 (ORCPT ); Wed, 30 Jul 2008 20:58:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754214AbYGaA6Q (ORCPT ); Wed, 30 Jul 2008 20:58:16 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:59802 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752759AbYGaA6P (ORCPT ); Wed, 30 Jul 2008 20:58:15 -0400 Date: Wed, 30 Jul 2008 17:54:20 -0700 (PDT) From: Linus Torvalds To: Jamie Lokier cc: Miklos Szeredi , jens.axboe@oracle.com, akpm@linux-foundation.org, nickpiggin@yahoo.com.au, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch v3] splice: fix race with page invalidation In-Reply-To: Message-ID: References: <20080731001131.GA30900@shareable.org> <20080731004214.GA32207@shareable.org> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1142 Lines: 27 On Wed, 30 Jul 2008, Linus Torvalds wrote: > > Personally, I think the right approach is to just realize that splice() is > _not_ a write() system call, and never will be. If you need synchronous > writing, you simply shouldn't use splice(). Side note: in-kernel users could probably do somethign about this. IOW, if there's some in-kernel usage (and yes, knfsd would be a prime example), that one may actually be able to do things that a _user_level user of splice() could never do. That includes things like getting the inode semaphore over a write (so that you can guarantee that pages that are in flight are not modified, except again possibly by other mmap users), and/or a per-page callback for when splice() is done with a page (so that you could keep the page locked while it's getting spliced, for example). And no, we don't actually have that either, of course. 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/