From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
To: Simon Kagstrom <simon.kagstrom@netinsight.net>
Cc: linux-mtd <linux-mtd@lists.infradead.org>,
Aaro Koskinen <aaro.koskinen@nokia.com>
Subject: Re: [PATCH v3 1/3]: mtdoops: Keep track of clean/dirty mtdoops pages in an array
Date: Sun, 11 Oct 2009 13:29:48 +0300 [thread overview]
Message-ID: <1255256988.16942.21.camel@localhost> (raw)
In-Reply-To: <20091008172628.12daa757@marrow.netinsight.se>
On Thu, 2009-10-08 at 17:26 +0200, Simon Kagstrom wrote:
> This patch makes mtdoops keep track of clean/dirty pages in an array
> instead of scanning the flash after a write. The advantage with this
> approach is that it avoids calling mtd->read on a panic, which is not
> possible for all mtd drivers.
>
> Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
> ---
> drivers/mtd/mtdoops.c | 48 +++++++++++++++++++++++++++++-------------------
> 1 files changed, 29 insertions(+), 19 deletions(-)
> diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
> index ac67833..435961e 100644
> --- a/drivers/mtd/mtdoops.c
> +++ b/drivers/mtd/mtdoops.c
> @@ -44,6 +44,7 @@ static struct mtdoops_context {
> int oops_pages;
> int nextpage;
> int nextcount;
> + u8 *oops_page_dirty;
> char *name;
So basically, you want to keep a per-page array which contains free/used
mtd oops page status. I find the term "dirty" a bit confusing. Could we
please instead use "used" or "free" or something like that?
Also, is it possible to make it 1 bit per oops page, not 1 byte? Just
less wasteful.
> @@ -428,6 +435,7 @@ static int __init mtdoops_console_init(void)
> printk(KERN_ERR "Failed to allocate mtdoops buffer workspace\n");
> return -ENOMEM;
> }
> + cxt->oops_page_dirty = NULL;
Minor nitpick: this initialization is unnecessary.
[snip]
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2009-10-11 10:30 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-02 14:05 [PATCH 0/3]: mtdoops fixes and improvements Simon Kagstrom
2009-10-02 14:06 ` [PATCH 1/3]: mtdoops: Make page size configurable Simon Kagstrom
2009-10-08 5:17 ` Artem Bityutskiy
2009-10-02 14:06 ` [PATCH 2/3]: mtdoops: Use panic_write if panic_on_oops is set Simon Kagstrom
2009-10-08 5:28 ` Artem Bityutskiy
2009-10-08 6:38 ` Simon Kagstrom
2009-10-11 6:00 ` Artem Bityutskiy
2009-10-12 6:23 ` Simon Kagstrom
2009-10-02 14:07 ` [PATCH 3/3]: mtdoops: store all kernel messages in a circular buffer Simon Kagstrom
2009-10-06 12:37 ` Simon Kagstrom
2009-10-06 14:50 ` [PATCH v2 " Simon Kagstrom
2009-10-08 14:42 ` [PATCH v2 0/3]: mtdoops fixes and improvements Simon Kagstrom
2009-10-08 14:44 ` [PATCH v2 1/3]: mtdoops: Keep track of clean/dirty mtdoops pages in an array Simon Kagstrom
2009-10-08 14:45 ` [PATCH v2 2/3]: mtdoops: Make page size configurable Simon Kagstrom
2009-10-08 14:45 ` [PATCH v2 3/3]: mtdoops: store all kernel messages in a circular buffer Simon Kagstrom
2009-10-08 15:15 ` [PATCH v2 0/3]: mtdoops fixes and improvements Simon Kagstrom
2009-10-08 15:25 ` [PATCH v3 " Simon Kagstrom
2009-10-08 15:26 ` [PATCH v3 1/3]: mtdoops: Keep track of clean/dirty mtdoops pages in an array Simon Kagstrom
2009-10-11 10:29 ` Artem Bityutskiy [this message]
2009-10-08 15:27 ` [PATCH v3 2/3]: mtdoops: Make page size configurable Simon Kagstrom
2009-10-11 10:38 ` Artem Bityutskiy
2009-10-08 15:27 ` [PATCH v3 3/3]: mtdoops: store all kernel messages in a circular buffer Simon Kagstrom
2009-10-11 10:04 ` [PATCH v3 0/3]: mtdoops fixes and improvements Artem Bityutskiy
2009-10-11 11:02 ` Artem Bityutskiy
2009-10-12 11:06 ` [PATCH v4 " Simon Kagstrom
2009-10-12 11:07 ` [PATCH v4 1/4]: mtdoops: avoid erasing already empty areas Simon Kagstrom
2009-10-12 11:09 ` [PATCH v4 2/4]: mtdoops: Keep track of used/unused mtdoops pages in an array Simon Kagstrom
2009-10-12 11:09 ` [PATCH v4 3/4]: mtdoops: Make page (record) size configurable Simon Kagstrom
2009-10-12 11:09 ` [PATCH v4 4/4]: mtdoops: store all kernel messages in a circular buffer Simon Kagstrom
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=1255256988.16942.21.camel@localhost \
--to=artem.bityutskiy@nokia.com \
--cc=aaro.koskinen@nokia.com \
--cc=linux-mtd@lists.infradead.org \
--cc=simon.kagstrom@netinsight.net \
/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).