Skip to contentSkip to conversation

a question about block device driver

DISCUSSION Alex Huang 2 participants 2 messages Apr 4, 2001

lore
Share & tools
lore

Alex Huang

author
#0 lore raw

Hi
Thank you very much for your help.
In the linux kernel version 2.4.X,
Does anybody mount a hard drive with MSDOS type file system ??

When I mount this hard drive using the command :
mount -t msdos /dev/hda1 /mnt/hd -o blocksize=1024
After mounting a hard disk, I read a file , and the system occours errors. After I check the msdos file system in "usr/src/linux/fs/fat/cvf.c"

Iin the codes,

 struct cvf_format bigblock_cvf={
     :
     :
     :
    default_fat_bmap,
    NULL,
    default_fat_file_write,
     :
     :

}

I check the data struct , the NULL field is defined a file_read callback function. So , when I read a file , will cause the system error.

In the kernel version 2.2.17, I can mount a MSDOS filesystem with the
option
"-o blocksize=1024", and the driver can read/write two pages at the same time. But in the kernel version 2.4.X, it doesn't work.

how two read/write two or more pages(blocks) at the same time in
the kernel version 2.4.X ??

Thanks

#1 lore raw
Quoted 3 lines

Thank you very much for your help.
In the linux kernel version 2.4.X,
Does anybody mount a hard drive with MSDOS type file system ??

yes

Quoted 5 lines

When I mount this hard drive using the command :
mount -t msdos /dev/hda1 /mnt/hd -o blocksize=1024
After mounting a hard disk, I read a file , and the system occours errors. After I check the msdos file system in "usr/src/linux/fs/fat/cvf.c"

Block sizes != media block size are broken for FAT in all 2.4 kernels. Use 2.2.19 if you want to get any work done.