public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Last sector of flash root partition will not be flashed
@ 2008-06-12 10:20 Hyphen79
  2008-06-12 13:20 ` Nancy
  0 siblings, 1 reply; 2+ messages in thread
From: Hyphen79 @ 2008-06-12 10:20 UTC (permalink / raw)
  To: linux-mtd

Hello,

the problem is, that the last sector of the mtd root partition 
(cramdisk) will not be flashed:

mtdblock: write on "File System" at 0x1f5e00, size 0x200
mtdblock: write on "File System" at 0x1f6000, size 0x200
mtdblock: writing cached data for "File System" at 0x1f5000, size 0x1000
mtdblock: write on "File System" at 0x1f6200, size 0x200
mtdblock: write on "File System" at 0x1f6400, size 0x200
mtdblock: write on "File System" at 0x1f6600, size 0x200
mtdblock: write on "File System" at 0x1f6800, size 0x200
mtdblock: write on "File System" at 0x1f6a00, size 0x200
mtdblock: write on "File System" at 0x1f6c00, size 0x200
mtdblock: write on "File System" at 0x1f6e00, size 0x200

But the last call to "write_cached_data" will not be done - even not 
after an explicit  "sync".
For example: "mtdblock: writing cached data for "File System" at 
0x1f6000, size 0x1000"
Has anyone an idea?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Last sector of flash root partition will not be flashed
  2008-06-12 10:20 Last sector of flash root partition will not be flashed Hyphen79
@ 2008-06-12 13:20 ` Nancy
  0 siblings, 0 replies; 2+ messages in thread
From: Nancy @ 2008-06-12 13:20 UTC (permalink / raw)
  To: Hyphen79; +Cc: linux-mtd

On Thu, Jun 12, 2008 at 6:20 PM, Hyphen79 <hyphen79@web.de> wrote:
> Hello,
>
> the problem is, that the last sector of the mtd root partition
> (cramdisk) will not be flashed:
>
> mtdblock: write on "File System" at 0x1f5e00, size 0x200
> mtdblock: write on "File System" at 0x1f6000, size 0x200
> mtdblock: writing cached data for "File System" at 0x1f5000, size 0x1000
> mtdblock: write on "File System" at 0x1f6200, size 0x200
> mtdblock: write on "File System" at 0x1f6400, size 0x200
> mtdblock: write on "File System" at 0x1f6600, size 0x200
> mtdblock: write on "File System" at 0x1f6800, size 0x200
> mtdblock: write on "File System" at 0x1f6a00, size 0x200
> mtdblock: write on "File System" at 0x1f6c00, size 0x200
> mtdblock: write on "File System" at 0x1f6e00, size 0x200
>
> But the last call to "write_cached_data" will not be done - even not
> after an explicit  "sync".
> For example: "mtdblock: writing cached data for "File System" at
> 0x1f6000, size 0x1000"
> Has anyone an idea?
You shoud umount it or write a program to flush the cache in mtdblock.c
For example:
/* flushcache.c  */
#include <sys/ioctl.h>
#include <linux/fs.h>
#include <fcntl.h>
#include <stdio.h>

int main(int argc,char **argv)
{
       int fd;

       if( argc != 2 ){
               printf( "Usage:%s device name(full path)\n", argv[0] );
               return -1;
       }

       if( (fd = open( argv[1], O_RDONLY ) ) == -1) {
               printf( "Open %s failed\n", argv[1] );
               return -1;
       }

       if( ioctl( fd, BLKFLSBUF) == -1)
               printf("flush catche failed\n");

       close(fd);
       return 0;
}

# cp ....; sync; flushcache /dev/mtdblockN

But why you use cramdisk as your rootfs ? Why do not use Nand awared
filesystem as its rootfs file system?


-- 
Best wishes,
Nancy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-12 13:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-12 10:20 Last sector of flash root partition will not be flashed Hyphen79
2008-06-12 13:20 ` Nancy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox