From mboxrd@z Thu Jan 1 00:00:00 1970 From: Trond Myklebust Subject: Re: [patch 2/5] fs: introduce new aops and infrastructure Date: Thu, 15 Mar 2007 16:06:39 -0400 Message-ID: <1173989199.6506.109.camel@heimdal.trondhjem.org> References: <20070314112529.13798.35417.sendpatchset@linux.site> <20070314112540.13798.97719.sendpatchset@linux.site> <20070315041329.GB21942@ca-server1.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Nick Piggin , Linux Filesystems , Linux Kernel , Christoph Hellwig , Andrew Morton To: Mark Fasheh Return-path: Received: from pat.uio.no ([129.240.10.15]:41468 "EHLO pat.uio.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933228AbXCOUHL (ORCPT ); Thu, 15 Mar 2007 16:07:11 -0400 In-Reply-To: <20070315041329.GB21942@ca-server1.us.oracle.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, 2007-03-14 at 21:13 -0700, Mark Fasheh wrote: > Hi Nick, > > On Wed, Mar 14, 2007 at 02:38:22PM +0100, Nick Piggin wrote: > > Introduce write_begin, write_end, and perform_write aops. > > > > These are intended to replace prepare_write and commit_write with more > > flexible alternatives that are also able to avoid the buffered write > > deadlock problems efficiently (which prepare_write is unable to do). > > > Index: linux-2.6/include/linux/fs.h > > =================================================================== > > --- linux-2.6.orig/include/linux/fs.h > > +++ linux-2.6/include/linux/fs.h > > @@ -449,6 +449,17 @@ struct address_space_operations { > > */ > > int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); > > int (*commit_write)(struct file *, struct page *, unsigned, unsigned); > > + > > + int (*write_begin)(struct file *, struct address_space *mapping, > > + loff_t pos, unsigned len, int intr, > > + struct page **pagep, void **fsdata); > > + int (*write_end)(struct file *, struct address_space *mapping, > > + loff_t pos, unsigned len, unsigned copied, > > + struct page *page, void *fsdata); > > Are we going to get rid of the file and intr arguments btw? I'm not sure > intr is useful, and mapping is probably enough to get whatever we inside > ->write_begin / ->write_end. Hell no! Struct file carries information that is essential for those of us that use strong authentication. It stays. Trond