Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761932AbYBTRXf (ORCPT ); Wed, 20 Feb 2008 12:23:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753456AbYBTRXZ (ORCPT ); Wed, 20 Feb 2008 12:23:25 -0500 Received: from lazybastard.de ([212.112.238.170]:45429 "EHLO longford.lazybastard.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751863AbYBTRXY (ORCPT ); Wed, 20 Feb 2008 12:23:24 -0500 Date: Wed, 20 Feb 2008 18:22:50 +0100 From: =?utf-8?B?SsO2cm4=?= Engel To: Stephane Chazelas Cc: =?utf-8?B?SsO2cm4=?= Engel , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [PATCH 2.6.24] block2mtd: removing a device and typo fixes Message-ID: <20080220172250.GA6873@lazybastard.org> References: <20080219150822.GA29587@lazybastard.org> <200802192333.39707.arnd@arndb.de> <20080220163042.GC5539@lazybastard.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1416 Lines: 37 On Wed, 20 February 2008 17:02:31 +0000, Stephane Chazelas wrote: > > sorry, I wasn't very clear. > > With "loop", you're doing an ioctl() to /dev/loop so that > /dev/loop become a block device associated with a given file. > > Applying that strictly to block2mtd wouldn't make sense. > > At the moment, when you create a new block2mtd, the only thing > you see is an entry in /proc/mtd. > > You don't access that mtd device directly (there's no > /dev/mtd). Instead, you may access it via a /dev/mtdblock > if you have "block2mtd" for instance. Actually, there is /dev/mtd. Enable CONFIG_MTD_CHAR. > Here, what you need, is an API that gets a block device (with fd > or path) and an erase size and that returns a mtd identifier. Erase size is a real difference, agreed. Otherwise the loop analogy is quite good. Occasionally people are asking for file->mtd translation as well. Jörn -- To announce that there must be no criticism of the President, or that we are to stand by the President, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public. -- Theodore Roosevelt, Kansas City Star, 1918 -- 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/