summaryrefslogtreecommitdiff
path: root/mkfs.ubifs/lpt.h
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2011-08-31 13:00:36 -0700
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-11 16:11:41 +0300
commitc4c8cdf621a5d1ea4f0f01ff004c6f1c33be9daa (patch)
tree7f2c6fe98d2d87bb33105fe79e8043f19c6dfb67 /mkfs.ubifs/lpt.h
parent040c937ca2c5ae1f35c24a3cc0154e9a31df5933 (diff)
mtdutils: move OOB auto-layout into libmtd's mtd_write
With the addition of the the new ioctl(MEMWRITE), we can use the kernel's internal OOB autoplacement option. It's a cleaner interface and avoids too much duplication of coding effort. This patch moves any legacy code (using MEMGETOOBSEL) into a legacy function in libmtd.c. It's not exactly a "pre-2.6.30" feature, so I'm not moving it to libmtd_legacy.c. Now, autoplacement features are only activated if we call mtd_write with mode == MTD_OPS_AUTO_OOB. This should fix some discrepancies for nandwrite, where we weren't handling OOB consistently (i.e., we had different functionality when the kernel did/didn't support MEMWRITE). But that also means that we now default to using MTD_OPS_PLACE_OOB instead of AUTO layout. To re-enable autoplacement, we can re-implement the `--autoplace' option that had previously rotted. This patch also cleans up a need for an extra OOB buffer in nandwrite. This has been tested a little in nandsim as well as on SLC NAND flash. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Diffstat (limited to 'mkfs.ubifs/lpt.h')
0 files changed, 0 insertions, 0 deletions