add physical_block_size field where applicable

only scsi_disk checks the actual value, other drivers take the logical block size.

This change reports the physical block size from the disk rather than the block
size used by IDE/SATA/SCSI commands. On typical modern SATA disks, the SATA
commands will use 512 byte blocks, but the disk will actually read and write
4K blocks internally. This is only of importance for partition alignment for DriveSetup,
and is independant of file systems or partitioning systems. This could also influence
the recommended block size for some file systems.

Change-Id: Id0f2e22659e89fcef64c1f8d04f81cd68995e01f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5667
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Jérôme Duval
2022-09-23 06:56:01 +00:00
committed by Adrien Destugues
parent 285fe6257a
commit 688acf41a3
25 changed files with 114 additions and 45 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ typedef struct scsi_periph_callbacks {
// informs of new size of medium
// (set to NULL if not a block device)
void (*set_capacity)(periph_device_cookie cookie, uint64 capacity,
uint32 blockSize);
uint32 blockSize, uint32 physicalBlockSize);
// *** removable devices
// called when media got changed (can be NULL if medium is not changable)