public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: J B <mad_flasher@hotmail.com>, linux-mtd@lists.infradead.org
Subject: Re: moving MTD partitions
Date: Wed, 30 Apr 2003 15:57:04 +0200	[thread overview]
Message-ID: <200304301557.04691.tglx@linutronix.de> (raw)
In-Reply-To: <Law11-F625OmHBewRNS00016c03@hotmail.com>

On Wednesday 30 April 2003 13:29, J B wrote:
> "The basic question is if it is feasible to resize (smaller or larger) a
> jffs2 filesystem / mtd block device over flash and maintain the existing
> contents. Copying the contents out and then back again is not an option
> (not enough space)."

First answer is no.
On second thought could be a possibility to do so. 

Assuming following situation:
block = eraseblock
part1:		100 blocks, none free
part2:		100 blocks, 20 blocks free

1. Force garbage collection in part2 (needs hacking jffs2) to free the blocks 
really
2. Write a block mover, which moves all used blocks of part2 to the end of 
part2
3. Erase the 20 blocks at the beginning of part2
4. rmmod mapping driver
5. change partition size of part1 (now 120 blocks) and part2 (now 80 blocks) 
in mapping driver (or give it to the mapping driver by module params)
6. reload mapping driver
7. remount filesystems

I don't know, what's that good for, but that's the only way to do it without 
data loss.

-- 
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de

  reply	other threads:[~2003-04-30 12:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-30 11:29 moving MTD partitions J B
2003-04-30 13:57 ` Thomas Gleixner [this message]
2003-04-30 13:04   ` David Woodhouse
     [not found] <Law11-F117Oc7wo95EF00013168@hotmail.com>
2003-04-30 16:28 ` Thomas Gleixner

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=200304301557.04691.tglx@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mad_flasher@hotmail.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