From: Mike Crowe <mac@mcrowe.com>
To: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH 0/2] Support skipping a certain number of good blocks
Date: Wed, 7 Dec 2016 09:56:50 +0000 [thread overview]
Message-ID: <20161207095650.GA13752@mcrowe.com> (raw)
In-Reply-To: <cdfdbe5d-1aa8-e424-7691-338d0d63f7b1@sigma-star.at>
On Wednesday 07 December 2016 at 09:53:49 +0100, David Oberhollenzer wrote:
> Since both tools already have a --start[address] option to specify an offset,
> wouldn't it make more sense for your case to add a flag that this offset should
> not include bad blocks? IMO this would remove the ambiguity of having two
> different offset options.
I agree that having two options isn't exactly clear. However, being able to
specify both a start address and a skip offset together might be useful if
the partition table is incorrect (this may occur during upgrades to a
bootloader version that uses a different partition table.)
But, if you'd prefer a separate option I can have a go at implementing
that.
> For both tools, instead of skipping bad blocks on the fly, it would IMO be cleaner
> if you could add a simple check that iterates over the erase blocks ahead of time
> and adjusts the offset if a block is bad. Then you wouldn't have to change the
> later checks or add additional clutches to the already cluttered read/write loop.
I tried to make my changes as minimal as possible, but you are correct that
it just makes the complex main loop even worse. I did initially try to scan
first but decided against that idea for reasons I've now forgotten. I'll
have another go at it.
Thanks for the review.
Mike.
next prev parent reply other threads:[~2016-12-07 9:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 18:04 [PATCH 0/2] Support skipping a certain number of good blocks Mike Crowe
2016-12-06 18:04 ` [PATCH 1/2] nandwrite: Add --output-skip Mike Crowe
2016-12-06 18:04 ` [PATCH 2/2] nanddump: Add --input-skip Mike Crowe
2016-12-06 18:11 ` [PATCH 0/2] Support skipping a certain number of good blocks Mike Crowe
2016-12-07 8:53 ` David Oberhollenzer
2016-12-07 9:56 ` Mike Crowe [this message]
2016-12-14 18:15 ` Mike Crowe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161207095650.GA13752@mcrowe.com \
--to=mac@mcrowe.com \
--cc=david.oberhollenzer@sigma-star.at \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).