Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934258AbcJUNYE (ORCPT ); Fri, 21 Oct 2016 09:24:04 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:33611 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933320AbcJUNYC (ORCPT ); Fri, 21 Oct 2016 09:24:02 -0400 Date: Fri, 21 Oct 2016 06:24:00 -0700 From: Christoph Hellwig To: Richard Weinberger Cc: Christoph Hellwig , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, dedekind1@gmail.com, adrian.hunter@intel.com, tytso@mit.edu, jaegeuk@kernel.org, david@sigma-star.at, wd@denx.de, sbabic@denx.de, dengler@linutronix.de Subject: Re: [PATCH 01/26] fscrypto: Add buffer operations Message-ID: <20161021132400.GA28880@infradead.org> References: <1477054121-10198-1-git-send-email-richard@nod.at> <1477054121-10198-2-git-send-email-richard@nod.at> <20161021130558.GA2411@infradead.org> <9c80d1d0-0237-606f-91ce-a004c3694aa5@nod.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c80d1d0-0237-606f-91ce-a004c3694aa5@nod.at> User-Agent: Mutt/1.6.1 (2016-04-27) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 651 Lines: 13 On Fri, Oct 21, 2016 at 03:17:03PM +0200, Richard Weinberger wrote: > UBIFS works on kmalloc()'ed buffers where it constructs the NAND/NOR pages > which will be written to the MTD. JFFS2 does the same. Yes, you can trivially do a virt_to_page on a kmalloc buffer. > Another reason why I did the buffer functions is because fscrypt_encrypt_page() > always allocates a bounce page as temporary memory. For ext4 this is needed, > for UBIFS not. > UBIFS has already a construction buffer, especially since it also does compression. We should defintively find a way to avoid that, but it's a separate issue from adding another API just to pass buffers.