Difference between revisions of "Squashfs support for MTD subsystem"

From eLinux.org
Jump to: navigation, search
(Added body of squashfs support for MTD subsystem)
 
m
Line 18: Line 18:
 
The following two tasks will be undertaken:
 
The following two tasks will be undertaken:
  
* Write a user-space utility that writes Squashfs filesystems to NAND, skipping bad
+
* Write a user-space utility that writes Squashfs filesystems to NAND, skipping bad blocks (and record that bad bocks have been skipped in the out of band data).
blocks (and record that bad bocks have been skipped in the out of band data).
+
  
* Re-write the low-level squashfs_read_data() routine in the kernel squashfs code to
+
* Re-write the low-level squashfs_read_data() routine in the kernel squashfs code to read directly from NAND using MTD.  This will use the out of band data to determine which blocks have been skipped by the user-space utility.
read directly from NAND using MTD.  This will use the out of band data to determine
+
which blocks have been skipped by the user-space utility.
+
  
 
It is anticipated that a major piece of the work will be the
 
It is anticipated that a major piece of the work will be the

Revision as of 21:02, 31 January 2011

Squashfs support for MTD subsystem

Summary
Squashfs support for MTD subsystem
Proposer
Phillip Lougher

Description

This proposal will add MTD subsystem support to Squashfs, including bad block handling.

Squashfs is already widely used on MTD devices (NAND flash etc.) in embedded systems, however, because Squashfs lacks native MTD support, this is currently performed via MTD's block device emulation (or via UBI or stored inside another MTD aware filesystem, i.e. YAFFS2/JFFS2). These solutions add unnecessary code and run-time overhead, and in the case of MTD's block device emulation, this lacks bad block support.

The following two tasks will be undertaken:

  • Write a user-space utility that writes Squashfs filesystems to NAND, skipping bad blocks (and record that bad bocks have been skipped in the out of band data).
  • Re-write the low-level squashfs_read_data() routine in the kernel squashfs code to read directly from NAND using MTD. This will use the out of band data to determine which blocks have been skipped by the user-space utility.

It is anticipated that a major piece of the work will be the refactoring of the squashfs_read_data() function and I/O backend in such a way that MTD support is added cleanly, minimising changes to existing critical code and without affecting performance.

Related work

Added MTD handling to Squashfs, without any bad block handling. Unfortunately, I (the Squashfs maintainer) considered the patch series to be overly complicated, it unnecessarily touched too much core code, and removed many performance optimisations (see http://article.gmane.org/gmane.linux.kernel/965490).

Scope

About 2 months

Contractor Candidates

I'm recommending myself, as the author and maintainer of Squashfs.

Comments