From: Russ Dill <Russ.Dill@asu.edu>
To: MTD for Linux <linux-mtd@lists.infradead.org>
Subject: Re: safe flash filesystem
Date: Thu, 21 Jun 2001 14:26:39 -0700 [thread overview]
Message-ID: <3B32668F.8020000@asu.edu> (raw)
In-Reply-To: 20010621163537.A26714@crystal.2d3d.co.za
If its just a config file, why make all this so complicated?
struct node {
u32 magic;
char valid;
u32 version;
u32 data_crc;
u32 hdr_crc;
char data[DATA_SIZE];
};
set aside 2-4 eraseblocks (preferably paramater blocks) and on mount,
find the valid config, walk though the flash and find the valid node
with the matching crc's and highest version (watch wraparound).
on writing a new config, if there is space left in the current erase
block, put it after the last one, after finishing writing it, set the
previos config's valid field to zero (flash lets you do this). If the
eraseblock is full, write in the next eraseblock, and when you are done,
erase the previous eraseblock.
All of this can be done in userspace or with a userspace library, just
mmap an mtd, and then use the erase ioctls.
databases and logs...thats another story
next prev parent reply other threads:[~2001-06-21 21:17 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-21 10:54 safe flash filesystem Abraham vd Merwe
2001-06-21 13:43 ` Vipin Malik
2001-06-21 13:57 ` Abraham vd Merwe
2001-06-21 14:29 ` Vipin Malik
2001-06-21 14:35 ` Abraham vd Merwe
2001-06-21 15:05 ` Vipin Malik
2001-06-21 15:36 ` Chris Read
2001-06-21 15:09 ` Joakim Tjernlund
2001-06-21 15:34 ` Vipin Malik
2001-06-21 19:34 ` Joakim Tjernlund
2001-06-21 19:47 ` Joakim Tjernlund
2001-06-21 15:11 ` Herman Oosthuysen
2001-06-21 17:54 ` Tim Riker
2001-06-21 19:43 ` Vipin Malik
2001-06-21 19:35 ` Tim Riker
2001-06-21 19:56 ` Vipin Malik
2001-06-21 21:17 ` Kyle Harris
2001-07-03 23:53 ` On the "safe filesystem" and write() topic Bjorn Wesen
2001-07-04 14:10 ` Vipin Malik
2001-07-05 18:16 ` Bjorn Wesen
2001-07-06 13:40 ` Vipin Malik
2001-07-07 9:25 ` Bjorn Wesen
2001-07-07 13:06 ` Vipin Malik
2001-06-21 21:26 ` Russ Dill [this message]
2001-06-22 8:22 ` safe flash filesystem Abraham vd Merwe
[not found] ` <20010622102154.E1828@crystal.2d3d.co.za>
2001-06-22 17:23 ` Russ Dill
2001-06-25 7:45 ` Abraham vd Merwe
2001-06-25 7:59 ` Russ Dill
2001-06-25 14:11 ` Vipin Malik
-- strict thread matches above, loose matches on Subject: below --
2001-06-21 16:05 Vipin Malik
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=3B32668F.8020000@asu.edu \
--to=russ.dill@asu.edu \
--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