public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Sébastien Côté" <scote1@Matrox.COM>
To: Simon Munton <Simon.Munton@m4data.co.uk>
Cc: "JFFS (E-mail)" <jffs-dev@axis.com>,
	"MTD (E-mail)" <mtd@infradead.org>,
	Finn Hakansson <finn@axis.com>
Subject: Re: intrep.c update to handle gaps in the middle of the log.
Date: Thu, 27 Jul 2000 09:27:09 -0400	[thread overview]
Message-ID: <398038AD.F763222@matrox.com> (raw)
In-Reply-To: 00B4D286538DD311BC6E005004E9EFC729B498@M4EXCH

Simon Munton wrote:
> 
> This update seems to bring about another problem.
> 
> My flash image (size = 0x7e0000) looks like this:
>         0x000000 - 0x2c8cff:    valid nodes
>         0x2c8d00 - 0x75ffff:    all 0xff
>         0x760000 - 0x76049f:    all zero
>         0x7604a0 - 0x7dffff:    valid nodes
> 
> With this update it results in the whole 0xff area being treated as dirty.
> If I try and copy a file on to it, it reports that the file system is full.
> 
> I think you need to restrict the amount of space treated as dirty to be in a
> single erase sector. Also, if the end of the area is at an erase sector
> boundary, don't treat as dirty at all.
> Do you need to check if nodes have already been found? Won't you also get
> the problem at the very start of the flash? (your original failure happened
> when you powered off mid update - but the sector being updated could easily
> have been the very first one).

Our original problem was a "hole" between two valid nodes (we forgot to
check if the data that followed was valid in the patch) but you're
right, it could happen to the first sector.  Maybe we should only check
if a free space ends in the middle of a sector.  In that case, treat the
beginning of that sector as dirty.  Would that do the trick?

If we have :

>         0x000000 - 0x2b0000:    valid nodes
>         0x2b0000 - 0x2b7000:    all 0xff	The error occured here
>         0x2b7000 - 0x2c0000:    all zero      We set this space as dirty
>	  0x2c0000 - 0x2c8cff:    valid nodes
>         0x2c8d00 - 0x75ffff:    all 0xff
>         0x760000 - 0x76049f:    all zero
>         0x7604a0 - 0x7dffff:    valid nodes

(Suppose all dirty space and valid nodes starts on the beginning of a
sector, I didn't want to do the math)

Would the filesystem be mounted correctly or do we _have_ to set the
first free space (where the error occured) as dirty too ? 

-- 
Sébastien Côté


To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

  reply	other threads:[~2000-07-27 13:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-27 12:29 intrep.c update to handle gaps in the middle of the log Simon Munton
2000-07-27 13:27 ` Sébastien Côté [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-07-27 13:57 Simon Munton
2000-07-27 14:13 ` Sébastien Côté

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=398038AD.F763222@matrox.com \
    --to=scote1@matrox.com \
    --cc=Simon.Munton@m4data.co.uk \
    --cc=finn@axis.com \
    --cc=jffs-dev@axis.com \
    --cc=mtd@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