* [PATCH 1/6] nanddump: kill --omitbad, --noskipbad
2011-06-24 18:03 [PATCH 0/6] complete nanddump feature-removals Brian Norris
@ 2011-06-24 18:03 ` Brian Norris
2011-06-24 18:08 ` Brian Norris
2011-06-24 18:03 ` [PATCH 2/6] nanddump: change default to --bb=skipbad Brian Norris
` (5 subsequent siblings)
6 siblings, 1 reply; 9+ messages in thread
From: Brian Norris @ 2011-06-24 18:03 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: David Woodhouse, Brian Norris, linux-mtd, Mike Frysinger
As mentioned previously, we are killing --omitbad in favor of the new
--bb=skipbad option, which functions fairly similarly. Also, --noskipbad
has become --bb=noskipbad, so remove the old `-N' and `--noskipbad' flags.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
nanddump.c | 46 +---------------------------------------------
1 files changed, 1 insertions(+), 45 deletions(-)
diff --git a/nanddump.c b/nanddump.c
index 0367d83..55c5586 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -64,21 +64,6 @@ static void display_help(void)
" dumpbad: dump flash data, including any bad blocks\n"
" skipbad: dump good data, completely skipping any bad blocks\n"
"\n"
-"Deprecated options:\n"
-"The following options are being replaced by --bb=METHOD flags or being\n"
-"removed entirely. Do not continue to use these options.\n"
-"-b --omitbad Omit bad blocks from the dump (DEPRECATED)\n"
-"-N --noskipbad Read without bad block skipping\n"
-"\n"
-"Notes on --omitbad and --bb=skipbad:\n"
-"* `omitbad' and `skipbad' are very similar; we are deprecating `--omitbad'\n"
-" in favor of `--bb=skipbad'.\n"
-"* With either option, we stop dumping data when we encounter a bad block\n"
-" and resume dumping at the next good block. However, with `omitbad', we\n"
-" count the bad block as part of the total dump length, whereas with\n"
-" `skipbad', the bad block is skipped, that is, not counted toward the\n"
-" total dump length.\n"
-"\n"
"Note on --oob, --omitoob:\n"
" To make nanddump act more like an inverse to nandwrite, we are changing\n"
" the default OOB behavior. In the next release, nanddump will not dump\n"
@@ -120,7 +105,6 @@ static enum {
padbad, // dump flash data, substituting 0xFF for any bad blocks
dumpbad, // dump flash data, including any bad blocks
skipbad, // dump good data, completely skipping any bad blocks
- omitbad // dump flash data, substituting nothing for any bad blocks (DEPRECATED)
} bb_method = padbad;
static void process_options(int argc, char * const argv[])
@@ -130,7 +114,7 @@ static void process_options(int argc, char * const argv[])
for (;;) {
int option_index = 0;
- static const char *short_options = "bs:f:l:opqnNca";
+ static const char *short_options = "s:f:l:opqnca";
static const struct option long_options[] = {
{"help", no_argument, 0, 0},
{"version", no_argument, 0, 0},
@@ -141,11 +125,9 @@ static void process_options(int argc, char * const argv[])
{"file", required_argument, 0, 'f'},
{"prettyprint", no_argument, 0, 'p'},
{"omitoob", no_argument, 0, 'o'},
- {"omitbad", no_argument, 0, 'b'}, //DEPRECATED
{"startaddress", required_argument, 0, 's'},
{"length", required_argument, 0, 'l'},
{"noecc", no_argument, 0, 'n'},
- {"noskipbad", no_argument, 0, 'N'},
{"quiet", no_argument, 0, 'q'},
{0, 0, 0, 0},
};
@@ -187,18 +169,6 @@ static void process_options(int argc, char * const argv[])
break;
}
break;
- case 'b':
- /* Check if bb_method was already set explicitly */
- if (bb_default) {
- bb_default = false;
- bb_method = omitbad;
- warnmsg("--omitbad is being deprecated in favor of --bb=skipbad.\n"
- " --omitbad will not be available in future releases.\n"
- " Please update your usage accordingly.");
- } else {
- error++;
- }
- break;
case 's':
start_addr = simple_strtoll(optarg, &error);
break;
@@ -233,18 +203,6 @@ static void process_options(int argc, char * const argv[])
case 'n':
noecc = true;
break;
- case 'N':
- /* Check if bb_method was already set explicitly */
- if (bb_default) {
- bb_default = false;
- bb_method = dumpbad;
- warnmsg("--noskipbad is being deprecated in favor of --bb=dumpbad.\n"
- " --noskipbad will not be available in future releases.\n"
- " Please update your usage accordingly.");
- } else {
- error++;
- }
- break;
case '?':
error++;
break;
@@ -499,8 +457,6 @@ int main(int argc, char * const argv[])
end_addr = mtd.size;
continue;
}
- if (bb_method == omitbad)
- continue;
memset(readbuf, 0xff, bs);
} else {
/* Read page data and exit on failure */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 1/6] nanddump: kill --omitbad, --noskipbad
2011-06-24 18:03 ` [PATCH 1/6] nanddump: kill --omitbad, --noskipbad Brian Norris
@ 2011-06-24 18:08 ` Brian Norris
0 siblings, 0 replies; 9+ messages in thread
From: Brian Norris @ 2011-06-24 18:08 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: David Woodhouse, Brian Norris, linux-mtd, Mike Frysinger
On Fri, Jun 24, 2011 at 11:03 AM, Brian Norris
<computersforpeace@gmail.com> wrote:
> As mentioned previously, we are killing --omitbad in favor of the new
> --bb=skipbad option, which functions fairly similarly. Also, --noskipbad
> has become --bb=noskipbad, so remove the old `-N' and `--noskipbad' flags.
Oops, I meant `--bb=dumpbad', not `--bb=noskipbad'. I'll resend if you
need me to change the commit msg...
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/6] nanddump: change default to --bb=skipbad
2011-06-24 18:03 [PATCH 0/6] complete nanddump feature-removals Brian Norris
2011-06-24 18:03 ` [PATCH 1/6] nanddump: kill --omitbad, --noskipbad Brian Norris
@ 2011-06-24 18:03 ` Brian Norris
2011-06-24 18:03 ` [PATCH 3/6] nanddump: change -o to mean --oob, not --omitoob Brian Norris
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Brian Norris @ 2011-06-24 18:03 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: David Woodhouse, Brian Norris, linux-mtd, Mike Frysinger
As promised, we change the default bad block handling method to
--bb=skipbad. This works as a better inverse to nandwrite, since
nandwrite skips bad blocks when writing data.
And of course, we remove the warning messages.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
nanddump.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/nanddump.c b/nanddump.c
index 55c5586..9edfbfd 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -60,9 +60,9 @@ static void display_help(void)
"-s addr --startaddress=addr Start address\n"
"\n"
"--bb=METHOD, where METHOD can be `padbad', `dumpbad', or `skipbad':\n"
-" padbad: dump flash data, substituting 0xFF for any bad blocks (default)\n"
+" padbad: dump flash data, substituting 0xFF for any bad blocks\n"
" dumpbad: dump flash data, including any bad blocks\n"
-" skipbad: dump good data, completely skipping any bad blocks\n"
+" skipbad: dump good data, completely skipping any bad blocks (default)\n"
"\n"
"Note on --oob, --omitoob:\n"
" To make nanddump act more like an inverse to nandwrite, we are changing\n"
@@ -105,7 +105,7 @@ static enum {
padbad, // dump flash data, substituting 0xFF for any bad blocks
dumpbad, // dump flash data, including any bad blocks
skipbad, // dump good data, completely skipping any bad blocks
-} bb_method = padbad;
+} bb_method = skipbad;
static void process_options(int argc, char * const argv[])
{
@@ -229,11 +229,6 @@ static void process_options(int argc, char * const argv[])
exit(EXIT_FAILURE);
}
- if (bb_default)
- warnmsg("you did not specify a default bad-block handling\n"
- " method. In future versions, the default will change to\n"
- " --bb=skipbad. Use \"nanddump --help\" for more information.");
-
if (oob_default)
warnmsg("in next release, nanddump will not dump OOB\n"
" by default. Use `nanddump --oob' explicitly to ensure\n"
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 3/6] nanddump: change -o to mean --oob, not --omitoob
2011-06-24 18:03 [PATCH 0/6] complete nanddump feature-removals Brian Norris
2011-06-24 18:03 ` [PATCH 1/6] nanddump: kill --omitbad, --noskipbad Brian Norris
2011-06-24 18:03 ` [PATCH 2/6] nanddump: change default to --bb=skipbad Brian Norris
@ 2011-06-24 18:03 ` Brian Norris
2011-06-24 18:03 ` [PATCH 4/6] nanddump: default to NOT dumping OOB data Brian Norris
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Brian Norris @ 2011-06-24 18:03 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: David Woodhouse, Brian Norris, linux-mtd, Mike Frysinger
As warned earlier, we are changing the meaning of `nanddump -o' to
mirror the usage in nandwrite, where -o means to include OOB (i.e.,
`nandwrite -o' writes data to both in-band and out-of-band areas, so
`nanddump -o' should dump data from both in-band and out-of-band areas).
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
nanddump.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/nanddump.c b/nanddump.c
index 9edfbfd..adf268b 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -53,8 +53,8 @@ static void display_help(void)
"-f file --file=file Dump to file\n"
"-l length --length=length Length\n"
"-n --noecc Read without error correction\n"
-"-o --omitoob Omit OOB data (default in next release)\n"
-" --oob Dump OOB data (current default)\n"
+" --omitoob Omit OOB data (default in next release)\n"
+"-o --oob Dump OOB data (current default)\n"
"-p --prettyprint Print nice (hexdump)\n"
"-q --quiet Don't display progress and status messages\n"
"-s addr --startaddress=addr Start address\n"
@@ -119,12 +119,12 @@ static void process_options(int argc, char * const argv[])
{"help", no_argument, 0, 0},
{"version", no_argument, 0, 0},
{"bb", required_argument, 0, 0},
- {"oob", no_argument, 0, 0},
+ {"omitoob", no_argument, 0, 0},
{"forcebinary", no_argument, 0, 'a'},
{"canonicalprint", no_argument, 0, 'c'},
{"file", required_argument, 0, 'f'},
+ {"oob", no_argument, 0, 'o'},
{"prettyprint", no_argument, 0, 'p'},
- {"omitoob", no_argument, 0, 'o'},
{"startaddress", required_argument, 0, 's'},
{"length", required_argument, 0, 'l'},
{"noecc", no_argument, 0, 'n'},
@@ -159,10 +159,10 @@ static void process_options(int argc, char * const argv[])
error++;
bb_default = false;
break;
- case 3: /* --oob */
+ case 3: /* --omitoob */
if (oob_default) {
oob_default = false;
- omitoob = false;
+ omitoob = true;
} else {
errmsg_die("--oob and --oomitoob are mutually exclusive");
}
@@ -184,7 +184,7 @@ static void process_options(int argc, char * const argv[])
case 'o':
if (oob_default) {
oob_default = false;
- omitoob = true;
+ omitoob = false;
} else {
errmsg_die("--oob and --oomitoob are mutually exclusive");
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 4/6] nanddump: default to NOT dumping OOB data
2011-06-24 18:03 [PATCH 0/6] complete nanddump feature-removals Brian Norris
` (2 preceding siblings ...)
2011-06-24 18:03 ` [PATCH 3/6] nanddump: change -o to mean --oob, not --omitoob Brian Norris
@ 2011-06-24 18:03 ` Brian Norris
2011-06-24 18:03 ` [PATCH 5/6] feature-removal: remove completed tasks Brian Norris
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Brian Norris @ 2011-06-24 18:03 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: David Woodhouse, Brian Norris, linux-mtd, Mike Frysinger
Since nandwrite doesn't write OOB data by default, we don't dump OOB data
by default, in order to be a more proper inverse function.
Remove the warnings and change the default.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
nanddump.c | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/nanddump.c b/nanddump.c
index adf268b..54198ae 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -53,8 +53,8 @@ static void display_help(void)
"-f file --file=file Dump to file\n"
"-l length --length=length Length\n"
"-n --noecc Read without error correction\n"
-" --omitoob Omit OOB data (default in next release)\n"
-"-o --oob Dump OOB data (current default)\n"
+" --omitoob Omit OOB data (default)\n"
+"-o --oob Dump OOB data\n"
"-p --prettyprint Print nice (hexdump)\n"
"-q --quiet Don't display progress and status messages\n"
"-s addr --startaddress=addr Start address\n"
@@ -62,14 +62,7 @@ static void display_help(void)
"--bb=METHOD, where METHOD can be `padbad', `dumpbad', or `skipbad':\n"
" padbad: dump flash data, substituting 0xFF for any bad blocks\n"
" dumpbad: dump flash data, including any bad blocks\n"
-" skipbad: dump good data, completely skipping any bad blocks (default)\n"
-"\n"
-"Note on --oob, --omitoob:\n"
-" To make nanddump act more like an inverse to nandwrite, we are changing\n"
-" the default OOB behavior. In the next release, nanddump will not dump\n"
-" OOB data by default. We will leave both the `--omitoob' and `--oob'\n"
-" options, but to mirror nandwrite, the short option `-o' will then stand\n"
-" for `--oob', not `--omitoob'. Please adjust your usage accordingly.\n",
+" skipbad: dump good data, completely skipping any bad blocks (default)\n",
PROGRAM_NAME);
exit(EXIT_SUCCESS);
}
@@ -92,7 +85,7 @@ static void display_version(void)
static bool pretty_print = false; // print nice
static bool noecc = false; // don't error correct
-static bool omitoob = false; // omit oob data
+static bool omitoob = true; // omit oob data
static long long start_addr; // start address
static long long length; // dump length
static const char *mtddev; // mtd device name
@@ -229,11 +222,6 @@ static void process_options(int argc, char * const argv[])
exit(EXIT_FAILURE);
}
- if (oob_default)
- warnmsg("in next release, nanddump will not dump OOB\n"
- " by default. Use `nanddump --oob' explicitly to ensure\n"
- " it is dumped.");
-
if ((argc - optind) != 1 || error)
display_help();
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 5/6] feature-removal: remove completed tasks
2011-06-24 18:03 [PATCH 0/6] complete nanddump feature-removals Brian Norris
` (3 preceding siblings ...)
2011-06-24 18:03 ` [PATCH 4/6] nanddump: default to NOT dumping OOB data Brian Norris
@ 2011-06-24 18:03 ` Brian Norris
2011-06-24 18:03 ` [PATCH 6/6] integck: fix build error (MS_DIRSYNC, MS_RELATIME) Brian Norris
2011-06-25 7:03 ` [PATCH 0/6] complete nanddump feature-removals Artem Bityutskiy
6 siblings, 0 replies; 9+ messages in thread
From: Brian Norris @ 2011-06-24 18:03 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: David Woodhouse, Brian Norris, linux-mtd, Mike Frysinger
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
feature-removal-schedule.txt | 37 -------------------------------------
1 files changed, 0 insertions(+), 37 deletions(-)
diff --git a/feature-removal-schedule.txt b/feature-removal-schedule.txt
index 338bc08..a5980f7 100644
--- a/feature-removal-schedule.txt
+++ b/feature-removal-schedule.txt
@@ -40,40 +40,3 @@ This is duplicating behavior with the mtdinfo utility. Now the util
warns when people use it, but it'll be removed in release 1.4.6.
---------------------------
-
-4. Rename --noskipbad option, kill --omitbad, change default BB method for nanddump
-
-Our bad block handling methods are getting disorganized. They will be replaced
-by a series of --bb=METHOD options (see `nanddump --help').
-
-In addition, the previous default bad block behavior was to dump 0xFF in place
-of bad blocks. This was not a good "inverse operation" of nandwrite. Thus, the
-current default behavior has become the (new) option --bb=padbad, and in 1.4.6,
-the default will be --bb=skipbad.
-
-The new `--bb=METHOD' options are included in this release, but all feature
-removals and changed defaults will occur in 1.4.6. For now, there are
-appropriate deprecation warning messages and an alert telling about the
-soon-to-be-default settings.
-
-Transition summary table:
------------------------------------------------------------------------------------------------------------
- Old option New option Comment
------------------------------------------------------------------------------------------------------------
- <default> --bb=padbad dump flash data, substituting 0xFF for any bad blocks
- --noskipbad --bb=dumpbad dump flash data, including any bad blocks
- --skipbad --bb=skipbad, <default> dump good data, completely skipping any bad blocks (new default)
- --omitbad N/A very similar to `skipbad', will be removed soon
-
----------------------------
-
-5. nanddump will not dump OOB by default
-
-In 1.4.6, nanddump will not dump OOB by default. To dump OOB, you will have to
-explicitly use the option `--oob'. For now, there is simply a warning every
-time you use nanddump without explicitly choosing `--oob' or `--omitoob'.
-
-Note that `-o' will no longer stand for `--omitoob'. To unify with nandwrite,
-it will stand for `--oob' (Dump OOB data).
-
----------------------------
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 6/6] integck: fix build error (MS_DIRSYNC, MS_RELATIME)
2011-06-24 18:03 [PATCH 0/6] complete nanddump feature-removals Brian Norris
` (4 preceding siblings ...)
2011-06-24 18:03 ` [PATCH 5/6] feature-removal: remove completed tasks Brian Norris
@ 2011-06-24 18:03 ` Brian Norris
2011-06-25 7:03 ` [PATCH 0/6] complete nanddump feature-removals Artem Bityutskiy
6 siblings, 0 replies; 9+ messages in thread
From: Brian Norris @ 2011-06-24 18:03 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: David Woodhouse, Brian Norris, linux-mtd, Mike Frysinger
Need to include <linux/fs.h>, at least for my build system. Otherwise,
you can't build the 'tests'.
integck.c: In function ‘parse_mount_options’:
integck.c:2862: error: ‘MS_DIRSYNC’ undeclared (first use in this
function)
integck.c:2862: error: (Each undeclared identifier is reported only once
integck.c:2862: error: for each function it appears in.)
integck.c:2872: error: ‘MS_RELATIME’ undeclared (first use in this
function)
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
tests/fs-tests/integrity/integck.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c
index 54e5ddc..30322cd 100644
--- a/tests/fs-tests/integrity/integck.c
+++ b/tests/fs-tests/integrity/integck.c
@@ -36,6 +36,7 @@
#include <sys/vfs.h>
#include <sys/mount.h>
#include <sys/statvfs.h>
+#include <linux/fs.h>
#define PROGRAM_VERSION "1.1"
#define PROGRAM_NAME "integck"
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 0/6] complete nanddump feature-removals
2011-06-24 18:03 [PATCH 0/6] complete nanddump feature-removals Brian Norris
` (5 preceding siblings ...)
2011-06-24 18:03 ` [PATCH 6/6] integck: fix build error (MS_DIRSYNC, MS_RELATIME) Brian Norris
@ 2011-06-25 7:03 ` Artem Bityutskiy
6 siblings, 0 replies; 9+ messages in thread
From: Artem Bityutskiy @ 2011-06-25 7:03 UTC (permalink / raw)
To: Brian Norris; +Cc: David Woodhouse, linux-mtd, Mike Frysinger
On Fri, 2011-06-24 at 11:03 -0700, Brian Norris wrote:
> Here's my patchset to complete the feature removals and change of
> defaults for nanddump (+ 1 bug fix for integck...). These should
> be pushed after the 1.4.5 release.
Pushed this series, thanks!
--
Best Regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 9+ messages in thread