Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757036Ab1FXNek (ORCPT ); Fri, 24 Jun 2011 09:34:40 -0400 Received: from mail.free-electrons.com ([88.190.12.23]:33277 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756960Ab1FXNej (ORCPT ); Fri, 24 Jun 2011 09:34:39 -0400 From: david.wagner@free-electrons.com To: linux-mtd@lists.infradead.org Cc: dedekind1@gmail.com, dwmw2@infradead.org, linux-kernel@vger.kernel.org, David Wagner Subject: [RFC] ubiblk: read-only block layer on top of UBI Date: Fri, 24 Jun 2011 15:34:41 +0200 Message-Id: <1308922482-14967-1-git-send-email-david.wagner@free-electrons.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1542 Lines: 35 From: David Wagner It creates one device for each UBI volume and dynamically add/remove one when a UBI volume is created or deleted : it registers to UBI notifications. The devices are names "ubiblkX_Y" where X is the UBI device number and Y is the volume ID. I'm submitting it for review, comments (on the concept as well as on the implementation) and advice. It is my first kernel module - a lot of code was taken from mtd_blkdevs and some from gluebi. It is only known to work well with SquashFS. Tests reported that with other filesystems (ext2/3 and vfat), some bytes in some files (I couldn't find any pattern), when read through ubiblk, don't match the original content (the content of a file becomes random on several "lines" and goes back to normal). The reason for that is still unknown. Some other known issues are listed in the commit message. drivers/mtd/ubi/Kconfig | 9 + drivers/mtd/ubi/Makefile | 1 + drivers/mtd/ubi/ubiblk.c | 462 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 472 insertions(+), 0 deletions(-) create mode 100644 drivers/mtd/ubi/ubiblk.c -- David Wagner, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com -- 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/