From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: "Øyvind Harboe" <oyvind.harboe@zylin.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: PATCH: allow JFFS2 to write to really small disks
Date: Thu, 1 Sep 2005 12:05:35 +0200 [thread overview]
Message-ID: <20050901100535.GA30932@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <1125480492.18626.42.camel@localhost.localdomain>
On Wed, 31 August 2005 11:28:12 +0200, Øyvind Harboe wrote:
>
> The attached patch allows JFFS2 to write to really small JFFS2 disks.
>
> This is e.g. useful when using JFFS2 for in-system one time programming
> of embedded device parameters: serial number, MAC, etc.
>
> Comments?
> Index: build.c
> ===================================================================
> RCS file: /home/cvs/mtd/fs/jffs2/build.c,v
> retrieving revision 1.76
> diff -u -r1.76 build.c
> --- build.c 30 Jul 2005 15:29:27 -0000 1.76
> +++ build.c 31 Aug 2005 09:01:34 -0000
> @@ -279,6 +279,14 @@
>
> c->resv_blocks_write = c->resv_blocks_deletion + (size / c->sector_size);
>
> + /* If the flash disk is smaller than resv_blocks_write, then we
> + allow writing to the disk anyway. The flash disk is then most likely
> + being used as write once - read many medimum, e.g. in-system configuration of
> + static parameters(e.g. MAC address of device in stored in "ROM"). */
> + if (c->resv_blocks_write * c->sector_size > c->flash_size) {
> + c->resv_blocks_write = 0;
> + }
> +
> /* When do we let the GC thread run in the background */
>
> c->resv_blocks_gctrigger = c->resv_blocks_write + 1;
Minor stuff: You indentation is broken.
If you changed the patch to add a mount option for the WORM case and
check for the mount option instead, this might go in. Looks like it
could be useful.
Jörn
--
Courage is not the absence of fear, but rather the judgement that
something else is more important than fear.
-- Ambrose Redmoon
next prev parent reply other threads:[~2005-09-01 10:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-31 9:28 PATCH: allow JFFS2 to write to really small disks Øyvind Harboe
2005-09-01 10:05 ` Jörn Engel [this message]
2005-09-01 11:12 ` Øyvind Harboe
2005-09-01 11:44 ` Jörn Engel
2005-09-01 11:52 ` Øyvind Harboe
2005-09-01 12:00 ` Jörn Engel
2005-09-01 12:45 ` Øyvind Harboe
2005-09-01 12:57 ` Jörn Engel
2005-09-01 13:00 ` Josh Boyer
2005-09-01 13:06 ` Øyvind Harboe
2005-09-02 12:44 ` Øyvind Harboe
2005-09-04 9:00 ` Jörn Engel
2005-09-05 10:05 ` oyvind.harboe
2005-09-05 10:27 ` Jörn Engel
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=20050901100535.GA30932@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=linux-mtd@lists.infradead.org \
--cc=oyvind.harboe@zylin.com \
/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