Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754712AbbETSBn (ORCPT ); Wed, 20 May 2015 14:01:43 -0400 Received: from mail.lang.hm ([64.81.33.126]:56078 "EHLO bifrost.lang.hm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753639AbbETSBk (ORCPT ); Wed, 20 May 2015 14:01:40 -0400 Date: Wed, 20 May 2015 11:01:12 -0700 (PDT) From: David Lang X-X-Sender: dlang@asgard.lang.hm To: Daniel Phillips cc: Jan Kara , Rik van Riel , tux3@tux3.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, OGAWA Hirofumi Subject: Re: [FYI] tux3: Core changes In-Reply-To: <555CB4B6.8050305@phunq.net> Message-ID: References: <8f886f13-6550-4322-95be-93244ae61045@phunq.net> <55545C2F.8040207@phunq.net> <20150519140045.GA16313@quack.suse.cz> <555B8C79.4090909@phunq.net> <20150520144429.GA17783@quack.suse.cz> <555CB4B6.8050305@phunq.net> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1527 Lines: 37 On Wed, 20 May 2015, Daniel Phillips wrote: > On 05/20/2015 07:44 AM, Jan Kara wrote: >> Yeah, that's what I meant. If you create a function which manipulates >> page cache, you better make it work with other functions manipulating page >> cache. Otherwise it's a landmine waiting to be tripped by some unsuspecting >> developer. Sure you can document all the conditions under which the >> function is safe to use but a function that has several paragraphs in front >> of it explaning when it is safe to use isn't very good API... > > Violent agreement, of course. To put it in concrete terms, each of > the page fork support functions must be examined and determined > sane. They are: > > * cow_replace_page_cache > * cow_delete_from_page_cache > * cow_clone_page > * page_cow_one > * page_cow_file > > Would it be useful to drill down into those, starting from the top > of the list? It's a little more than determining that these 5 functions are sane, it's making sure that if someone mixes the use of these functions with other existing functions that the result is sane. but it's probably a good starting point to look at each of these five functions in detail and consider how they work and could interact badly with other things touching the page cache. David Lang -- 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/