[haiku-bugs] Re: [Haiku] #11796: Support for "4K-native" hard disks.

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Thu, 04 Nov 2021 08:08:51 -0000

#11796: Support for "4K-native" hard disks.
--------------------------+----------------------------
  Reporter:  pulkomandy   |      Owner:  nobody
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  Unscheduled
 Component:  - General    |    Version:  R1/Development
Resolution:               |   Keywords:
Blocked By:               |   Blocking:
  Platform:  All          |
--------------------------+----------------------------
Comment (by pulkomandy):

 In SDHC and SDXC cards, this field was removed from the CSD and the sector
 size is fixed to 512 bytes.

 To test this, you would have to find a 2GB or 4GB non-SDHC card, of which
 there are not many (SDHC was specified before 2GB cards became common).

 The question here is mainly what happens for MBR and GPT, since they store
 partition offsets in LBA numbers. If the sectors on disk are larger, are
 we expected to store sizes in multiples of 512 bytes regardless of it, or
 are we expected to store them in multiples of the sector size used by the
 disk?

 The SATA driver is also not currently able to handle sectors if size other
 than 512. There are some anouncements for migrating to "4K native" disks
 (https://www.seagate.com/tech-insights/advanced-format-4k-sector-hard-
 drives-master-ti/ for example), Windows and Linux support it, but I'm not
 sure where to buy one such drive.

 There are no problem at the driver API level where we just use off_t, so
 it is up to each driver to do the conversion from off_t to blocks. But we
 should also make sure to keep reads and writes aligned to sectors (which I
 think we can do using the block cache and DMA constraints).
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/11796#comment:3>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: