688acf41a3
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 <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
70 lines
1.6 KiB
C
70 lines
1.6 KiB
C
/*
|
|
* Copyright 2003-2009, Haiku Inc.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Ingo Weinhold, bonefish@users.sf.net
|
|
*/
|
|
#ifndef _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H
|
|
#define _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H
|
|
|
|
|
|
#include <OS.h>
|
|
|
|
#include <DiskDeviceDefs.h>
|
|
|
|
|
|
// userland partition representation
|
|
typedef struct user_partition_data user_partition_data;
|
|
struct user_partition_data {
|
|
partition_id id;
|
|
off_t offset;
|
|
off_t size;
|
|
off_t content_size;
|
|
uint32 block_size;
|
|
uint32 physical_block_size;
|
|
uint32 status;
|
|
uint32 flags;
|
|
dev_t volume;
|
|
int32 index;
|
|
int32 change_counter; // TODO: needed?
|
|
disk_system_id disk_system;
|
|
char* name;
|
|
char* content_name;
|
|
char* type;
|
|
char* content_type;
|
|
char* parameters;
|
|
char* content_parameters;
|
|
void* user_data;
|
|
int32 child_count;
|
|
user_partition_data* children[1];
|
|
};
|
|
|
|
// userland disk device representation
|
|
typedef struct user_disk_device_data {
|
|
uint32 device_flags;
|
|
char* path;
|
|
user_partition_data device_partition_data;
|
|
} user_disk_device_data;
|
|
|
|
// userland disk system representation
|
|
typedef struct user_disk_system_info {
|
|
disk_system_id id;
|
|
char name[B_FILE_NAME_LENGTH];
|
|
// TODO: better B_PATH_NAME_LENGTH?
|
|
char short_name[B_OS_NAME_LENGTH];
|
|
char pretty_name[B_OS_NAME_LENGTH];
|
|
uint32 flags;
|
|
} user_disk_system_info;
|
|
|
|
// userland disk device job representation
|
|
typedef struct user_disk_device_job_info {
|
|
disk_job_id id;
|
|
uint32 type;
|
|
partition_id partition;
|
|
char description[256];
|
|
} user_disk_device_job_info;
|
|
|
|
|
|
#endif // _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H
|