From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josef Bacik Subject: [RFC] new ->perform_write fop Date: Wed, 12 May 2010 17:24:04 -0400 Message-ID: <20100512212403.GE3597@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: chris.mason@oracle.com, hch@infradead.org, akpm@linux-foundation.org, npiggin@suse.de, linux-kernel@vger.kernel.org To: linux-fsdevel@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:22097 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757646Ab0ELVY0 (ORCPT ); Wed, 12 May 2010 17:24:26 -0400 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hello, I just started adding aio_write to Btrfs and I noticed we're duplicating _alot_ of the generic stuff in mm/filemap.c, even though the only thing thats really unique is the fact that we copy userspace pages in chunks rather than one page a t a time. What would be best is instead of doing write_begin/write_end with Btrfs, it would be nice if we could just do our own perform_write instead of generic_perform_write. This way we can drop all of these generic checks we have that we copied from filemap.c and just got to the business of actually writing the data. I hate to add another file operation, but it would _greatly_ reduce the amount of duplicate code we have. If there is no violent objection to this I can put something together quickly for review. Thanks, Josef