Doomer wrote:
fzabkar wrote:
Your answer is confusing. You seem to be suggesting that the user might want to switch sector sizes after installing a file system. Obviously that would be silly. The decision as to the LBA size would need to be made before the drive was partitioned and formatted.
IDK why that would be silly
It would be silly because it would render the data inaccessible. In fact I see this exact same scenario in various storage forums on an almost weekly basis.
For example, take a Seagate or WD 3TB external drive. These come preconfigured with a single 3TB MBR partition and 4KB LBAs. In other words, they behave as 4Kn drives.
Now remove these drives from their enclosures and attach them directly to a SATA port inside your computer. This exposes the drives' native 512e LBAs.
So now you have a "4Kn file system" and a 512e interface. The partition table is telling the OS that the boot sector is at LBA X. Inside the enclosure, LBA X would correspond to
physical sector X (= logical sector 8X), but inside the computer it corresponds to
logical sector X. In short, the OS cannot find the boot sector and asks the user if they wish to format their drive.
Doomer wrote:
... creating to separate FWs and simply putting them to SA is not gonna do the trick because:
1. you need a space in flash to keep code that would understand both 512 and 4K sectors (no, not all ATA commands are in SA code, some of them are in flash code and Toshiba drives don't have SA code at all BTW) and since you want two separate codes then you need either two flashes or twice as bigger flash -> more money
1. you need special boot loader that would select which FW to load. And such loader does not yet exist -> more developing is needed -> more money, more potential bugs
2. you need new different system area layout to keep two separate FWs and that doesn't not exists -> more developing is needed ->more money, more potential bugs
That's from a top of my head. Lets say Toshiba overcomes all that, then what? What's the benefit? I actually don't see any.
I don't see the advantage of having two separate models which have essentially no real differences, unless the intention is to target different market segments and to charge a price premium for one over the other. In fact there must be costs associated with having two models when one could suffice, and wouldn't these costs be more significant that the cost of a little extra flash memory plus a little extra software development?
As for the special boot loader, how hard can that be? The individual 4Kn and 512e firmware has already been tested and debugged, so we could just assign each to its own half of flash. The boot loader would only need to examine the state of the jumper (an MCU GPIO pin), and then load the corresponding half of flash into SDRAM.
As for the SA layout, wouldn't (or couldn't) the code in the firmware modules be based on the physical sector size rather than logical sector size, and wouldn't this then make the SA structure independent of the LBA size?