[PATCH 00/10] nandwrite: cleanup, support ioctl(MEMWRITE)

Brian Norris computersforpeace at gmail.com
Wed Aug 31 16:00:29 EDT 2011


This patch series cleans up old features in nandwrite and supports new
features with ioctl(MEMWRITE).

Byproducts of this include:
(1) kill --raw
(2) re-implement --autoplace
(3) support OOB writes for MLC NAND (only write once per page)

(1) is done because it's difficult to really tell the reason for --raw
in the first place. Thus, in restructuring mtd_write and nandwrite, I
cannot support it. I don't think anyone will miss it.
(2) is done just because we can. Previously, support for the autoplace
OOB layout was spotty, depended on the obsolete ioctl(MEMGETOOBSEL), and
utilized user-space code to imitate an internal kernel interface. Old
code can be supported with little impact by pushing it to a "legacy"
function and supporting autoplacement primarily by way of the new
ioctl(MEMWRITE).
(3) was kind of the end goal for introducing ioctl(MEMWRITE). We needed
a user interface that could write data+OOB in a single operation.

Brian

Brian Norris (10):
  nandwrite: trivial variable move
  mtd-utils: update mtd-abi.h
  nandwrite: consolidate buffer usage
  libmtd: modify `mtd_write' to cover OOB writes
  libmtd: support MEMWRITE ioctl
  nandwrite: merge `mtd_write_oob' and `mtd_write' calls
  mtdutils: move OOB auto-layout into libmtd's mtd_write
  nandwrite: kill `--raw' option
  nandwrite: re-implement `--autoplace' option
  nandwrite: use common.h "errmsg" functions

 include/libmtd.h      |   15 ++++--
 include/mtd/mtd-abi.h |  122 ++++++++++++++++++++++++++++++++++++------
 lib/libmtd.c          |   86 ++++++++++++++++++++++++++----
 nanddump.c            |    2 +-
 nandwrite.c           |  143 +++++++++++++++++--------------------------------
 ubi-utils/ubiformat.c |    6 ++-
 6 files changed, 245 insertions(+), 129 deletions(-)

-- 
1.7.5.4





More information about the linux-mtd mailing list