Hello all,
I have two things on my desk now.
-----------------------------------------------------------------------
1) There is bug in FAT FS which is triggered by lseek after end of file
and then calling write. Old code allocated and zeroed all necessary
clusters to write at wanted position. New code cannot do that. I use
this for allocating new STACKER CVF file by program MKSTACFS.
To trig bug call something like "mkstacfs stacvol.000 10000 4"
on any mounted DOS partition. It should create 5MB long file
"stacvol.000", but it leads to :
-----
Nov 1 22:51:11 thor kernel: kernel BUG at file.c:94!
Nov 1 22:51:11 thor kernel: invalid operand: 0000
Nov 1 22:51:11 thor kernel: CPU: 0
Nov 1 22:51:11 thor kernel: EIP: 0010:[<c480af7d>]
Nov 1 22:51:11 thor kernel: EFLAGS: 00010286
Nov 1 22:51:11 thor kernel: eax: 00000019 ebx: 00000000 ecx: 00000000 edx:
0000003b
Nov 1 22:51:11 thor kernel: esi: 00002717 edi: c1d522a0 ebp: c1801380 esp:
c1e63e5c
Nov 1 22:51:11 thor kernel: ds: 0018 es: 0018 ss: 0018
Nov 1 22:51:11 thor kernel: Process mkstacfs (pid: 1456, stackpage=c1e63000)
Nov 1 22:51:11 thor kernel: Stack: 0000005e 00002717 00001000 00000008 00000000
c0128e0b c1d522a0 00002717
Nov 1 22:51:11 thor kernel: c1801380 00000001 c105a000 004e2000 00000fff
00000000 00000000 c1800fff
Nov 1 22:51:11 thor kernel: c1800fff c1801620 00000007 00000000 00000001
000001ff 00000007 00000007
[<c0128e0b>] block_write_cont_page+653
[<c480b12e>] fat_write_partial_page+302
[<c011f527>] generic_file_write+577
[<c480b19f>]
[<c480b000>]
[<c480b172>]
[<c01261ea>] sys_write+184
[<c0108c84>]
int fat_get_block(struct inode *inode, long iblock, struct buffer_head *bh_result, int
create) {
...........
if (iblock<<9 != MSDOS_I(inode)->i_realsize) {
BUG();
return -EIO;
}
-----
I did not try to fix this. I can write simple code to allocate
full needed cluster chain, but I do not know reasons of original
writer. There is no comment for "i_realsize". It seems, that it is
file size rounded up to multiple of SECTOR_SIZE.
I think, that multiple of cluster size would have more sense,
but I realy do not know reasons of original writer.
---------------------------------------------------------------------
2) I have spend little of time on update of DMSDOS to 2.3.x
kernels. I have patched FAT FS and version of DMSDOS
which can read, write and map readonly by use of readpage.
It doesnot use new page cache for reads and writes.
These problems I want to solve after kernel stabilization.
I need stable VFS and FAT which will not change for some time.
But there are some real bugs in FAT, which disables usage
of CVF layer for anything else than big blocks.
I have put these changes and more comented cvf.c to my
first patch. It contains what DMSDOS realy needs in kernel
and patch should not break anything.
I have more changes on my hard drive, but they are only experimental.
Best wisches,
Pavel Pisa
PS: please CC directly to me
FAT BUG() trigger
My updates for future DMSDOS versions