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
@@ -22,6 +22,7 @@ struct user_partition_data {
off_t size;
off_t content_size;
uint32 block_size;
uint32 physical_block_size;
uint32 status;
uint32 flags;
dev_t volume;