[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More JFFS problems...
On Wed, 2 Aug 2000, David Woodhouse wrote:
>
> Test program:
>
> fd = open("testfile", O_CREAT| O_RDWR, S_IRUSR);
> write(fd, "Thrunge\n", 8);
> write(fd, "Wibble\n",7);
> lseek(fd, 2, SEEK_SET);
> write(fd, "xx", 2);
> fsync(fd);
> close(fd);
>
>
> Result:
> [root@alpha1 /mnt]# /home/dwmw2/testfile-alpha
> [root@alpha1 /mnt]# cat testfile
> Thrunge
> Wibble
> [root@xxxxxxx.
> [root@alpha1 /]# umount /mnt
> [root@alpha1 /]# mount /dev/mtdblock0 /mnt -t jffs
> [root@alpha1 /]# cat mnt/testfile
> Thrunge
> Wibble
> xx[root@alpha1 /]# (note the 'xx' is at the end)
>
> The structure on the media seems to be correct - the third node has a
> start location of '2'. However, the result of reading back the file, either
> immediately, or after a remount, is incorrect.
I've suspected problems like this since Sébastien managed to have his
changes to mkfs.jffs work even though he didn't change the offset of the
nodes... I think the handling of partial node rewriting isn't working.
/ Alex