Hello,
I would like to know how did you implement your multi-sector read/write operations (eg: if your filesystem needs 1KB blocks or more instead of 512 bytes blocks).
Did you program your FDC driver (and DMA) to read more than one 512-bytes sector (eg: reading an entire track) or did you simply leave it to the filesystem driver to issue as many SEPARATE sector reads/writes as there are "sectors per block"?
Thank you for your replies.
Multi-sector operations implementation
- ManOfSteel
- Member
- Posts: 60
- Joined: Tue Feb 01, 2005 12:00 am
Hi,
I'm not certain what level you are talking about: VFS or lower-down in the driver. So I'll quickly talk about both.
My VFS obviously has no concept of 'sectors', 'blocks' or 'tracks'. It can read/write any number of bytes.
The HDD driver (I don't have a floppy one) recieves reads/writes for any number of bytes. It converts this number into a number of sector reads. If it can convert it to a single bus read of multiple sectors then it does.
JamesM
I'm not certain what level you are talking about: VFS or lower-down in the driver. So I'll quickly talk about both.
My VFS obviously has no concept of 'sectors', 'blocks' or 'tracks'. It can read/write any number of bytes.
The HDD driver (I don't have a floppy one) recieves reads/writes for any number of bytes. It converts this number into a number of sector reads. If it can convert it to a single bus read of multiple sectors then it does.
JamesM
When dealing with the hard drive I always read in 64 sectors at a time and then buffer that. I put 64 in the sector count register and just issue the command once instead of issuing 64 separate sector reads. It just seems more efficient to me. So a request for 96 sectors worth of data would end up performing 2 64 sector reads from the hard disk.
The floppy driver always reads 18 sectors at a time. Requests longer that 18 sectors would result in multiple 18 sector reads.
All the fixed read lengths make it a lot easier to buffer the data in the drivers.
The floppy driver always reads 18 sectors at a time. Requests longer that 18 sectors would result in multiple 18 sector reads.
All the fixed read lengths make it a lot easier to buffer the data in the drivers.