Hi,
Sector size of disks starting with very old diskettes are 512 byte
until now. Exceptions have arisen nearly recently (2010) when some HDD
manufacturers (I know about WD) introduced hard drives with 4096 byte
physical sectors. But the change has made only on internals of HD
drive, logically no changes required to programs to work, although
working with ordinary "small" 512 sectors aligned on these "big"
sector boundaries makes the disk work much faster. HDD manufacturers
provide special utilities for aligning the partition start sectors, by
moving these partitions to nearest boundary
More details are here:
http://en.wikipedia.org/wiki/Advanced_Format
The summary is that practically, treating size sectors as 512 bytes
will work yet for very long time, and for near future it would be
enough to align partitions.
That said, in long run, naturally, it would be better to encounter
real sectors' size.
Regards,
M.A.
On Thu, Aug 23, 2012 at 9:48 PM, Timo Kreuzer <timo.kreuzer(a)web.de> wrote:
Btw, we are using a lot of hardcoded 512 values here
for sector size even
though there is a field in the Volume structure for that.
Is that correct?
Am 23.08.2012 14:02, schrieb tkreuzer(a)svn.reactos.org:
> Author: tkreuzer
> Date: Thu Aug 23 12:02:30 2012
> New Revision: 57141
>
> URL:
http://svn.reactos.org/svn/reactos?rev=57141&view=rev
> Log:
> [FREELDR]
> Improve readability of sector calculation
>
> Modified:
> trunk/reactos/boot/freeldr/freeldr/fs/fat.c
>
> Modified: trunk/reactos/boot/freeldr/freeldr/fs/fat.c
> URL:
>
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/fa…
>
> ==============================================================================
> --- trunk/reactos/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] (original)
> +++ trunk/reactos/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] Thu Aug 23
> 12:02:30 2012
> @@ -1338,8 +1338,7 @@
> //
> // Seek to right position
> //
> - Position.HighPart = SectorNumber >> 23;
> - Position.LowPart = SectorNumber << 9;
> + Position.QuadPart = (ULONGLONG)SectorNumber * 512;
> ret = ArcSeek(Volume->DeviceId, &Position, SeekAbsolute);
> if (ret != ESUCCESS)
> {