From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Woodhouse Subject: Re: Implementing writepage Date: Sat, 25 Oct 2003 17:18:19 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <1067098698.3266.19.camel@lapdancer.baythorne.internal> References: <20031025092152.D638B6D5B@blood.actrix.co.nz> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from 1Cust12.tnt5.lnd1.gbr.da.uu.net ([62.188.19.12]:20608 "EHLO lapdancer.baythorne.internal") by vger.kernel.org with ESMTP id S262703AbTJYQSG (ORCPT ); Sat, 25 Oct 2003 12:18:06 -0400 To: manningc2@actrix.gen.nz In-Reply-To: <20031025092152.D638B6D5B@blood.actrix.co.nz> List-Id: linux-fsdevel.vger.kernel.org On Sat, 2003-10-25 at 22:27 +0000, Charles Manning wrote: > I need to therefore implement writepage and have a few questions: No you don't. This is flash -- people don't really need shared writable mmap; if they think they do, they need educating not pandering to. > 1) Is there a generic writepage lurking somewhere that will use > prepare/commit_write instead? Don't think so. Offhand I don't see why it couldn't be done, but it's not what most file systems would want. > 2) What fiddling is required with kmap & page flags within writepage or is > this all handled by the caller? You'll need to kmap the page since you actually want to touch the data with the CPU. You probably also need to mark the page uptodate when you're done. Take a look at the generic block writepage. > Any help appreciated. Ensure you have no memory allocations in the writepage() code path, unless they're done with (IIRC) GFP_NOIO. -- dwmw2