Sector sizes in the kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I am reading from LDD3 and in the block device chapter there is a talk about
KERNEL_SECTOR_SIZE which is supposed to be 512bytes.
The problem is the terminology. A sector is a very big thing, i.e.:
in a floppy you have 18 sectors, 2 heads, 80 cylinders and a block size of 
512bytes. The size of a sector (which is a slice) is 80 * 512 bytes.
http://en.wikipedia.org/wiki/Cylinder-head-sector
I am sure this is not what they meant in the kernel.
I.e., i think they meant block size.
but in the same code they also mention a sector which seems to be referring to 
the number of sectors:16 (slice). In section 16.2.3
And then they say geo.start = 4 to refer to the starting sector but this time 
again they probably mean block. This is confusing. Can somebody clear this 
up?

Also, regarding sectors of 2048 bytes (block size) and the kernel works with 
512bytes. If your device work in 2048 bytes, do you have to translate each 
sector (block) to 4 consecutive kernel sectors in the (virtual) array of 
sectors the kernel sees in your driver?
The problem with that is that it would think that a request are not on the 
same cylinder and won't group it correctly. I.e. 4 virtual kernel cylinders 
are actually 1 cylinder in the device.

10x.

-- 
Regards,
        Tzahi.
--
Tzahi Fadida
Blog: http://tzahi.blogsite.org | Home Site: http://tzahi.webhop.info
WARNING TO SPAMMERS:  see at 
http://members.lycos.co.uk/my2nis/spamwarning.html

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux