History log of /haiku/src/add-ons/kernel/drivers/disk/scsi/scsi_disk/scsi_disk.h
Revision Date Author Comments
# 688acf41 15-Sep-2022 Jérôme Duval <jerome.duval@gmail.com>

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 <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 0715529b 26-Apr-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Renamed IOScheduler to IOSchedulerSimple and pulled an interface IOScheduler
out of it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36492 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aa4ba93e 08-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Renamed src/system/kernel/device_manager/io_requests.{h,cpp} to
IORequest.{h,cpp}.
* Introduced public <io_requests.h> header. Currently it only declares the
single function BFS uses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29446 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 70e2d4ac 14-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Replaced the B_BLOCK_DEVICE_* defines with B_DMA_* defines that better match
our dma_restrictions structure (but we're using blocks instead of bytes,
since unlike the block size, the restrictions attributes are constant).
* We might want to use blocks for the dma_restrictions structure as well in
the future...
* Fixed another bug in the device_node variant of DMAResource::Init(): the max
segment size was specified in blocks as well.
* Removed the "hardcode" block_io module and header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26973 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 24593e2c 05-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* First baby steps in letting our drivers use the new I/O request/scheduler
architecture: for now, we do this on the lowest layer only, therefore all
requests are handled synchronously (ie. in the scheduler's thread).
* Instead of using the block_io module, scsi_disk (and scsi_cd) are now
exporting a device on their own, and use an I/O scheduler with an appropriate
DMA resource.
* There are still lots of TODOs, and it can easily panic - don't update if
you intend to demo Haiku.
* scsi_periph now only has an io() function that get an io_operation, instead
of the previous read/write functions, moved preferred CCB size from those
functions into the device registration.
* Changed all scsi_periph files to C++.
* scsi_cd ported, too, but untested.
* Removed block_io from image - it will be removed completely soon.
* Temporarily commented an ASSERT() in the ATA bus manager (in case you use
it); it's sometimes triggered by the code now, and I haven't yet looked into
the issue -- doesn't seem to harm, at least.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26828 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc128a4c 31-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Made block_io.h usable from C++ (which doesn't like "typedef a *a" anymore).
* Renamed scsi_dsk to scsi_disk.
* Joined all scsi_disk sources together to a single scsi_disk.cpp file.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25737 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0715529b59a3965beea04288a564458225d6f470 26-Apr-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Renamed IOScheduler to IOSchedulerSimple and pulled an interface IOScheduler
out of it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36492 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aa4ba93e25c1c63730ba69e04d3d96c3253924fd 08-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Renamed src/system/kernel/device_manager/io_requests.{h,cpp} to
IORequest.{h,cpp}.
* Introduced public <io_requests.h> header. Currently it only declares the
single function BFS uses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29446 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 70e2d4ac43aa54d8c567ec12e6b24155d3171dd9 14-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Replaced the B_BLOCK_DEVICE_* defines with B_DMA_* defines that better match
our dma_restrictions structure (but we're using blocks instead of bytes,
since unlike the block size, the restrictions attributes are constant).
* We might want to use blocks for the dma_restrictions structure as well in
the future...
* Fixed another bug in the device_node variant of DMAResource::Init(): the max
segment size was specified in blocks as well.
* Removed the "hardcode" block_io module and header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26973 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 24593e2c79f5f228fd9e1edd3e705d5aa286dcdb 05-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* First baby steps in letting our drivers use the new I/O request/scheduler
architecture: for now, we do this on the lowest layer only, therefore all
requests are handled synchronously (ie. in the scheduler's thread).
* Instead of using the block_io module, scsi_disk (and scsi_cd) are now
exporting a device on their own, and use an I/O scheduler with an appropriate
DMA resource.
* There are still lots of TODOs, and it can easily panic - don't update if
you intend to demo Haiku.
* scsi_periph now only has an io() function that get an io_operation, instead
of the previous read/write functions, moved preferred CCB size from those
functions into the device registration.
* Changed all scsi_periph files to C++.
* scsi_cd ported, too, but untested.
* Removed block_io from image - it will be removed completely soon.
* Temporarily commented an ASSERT() in the ATA bus manager (in case you use
it); it's sometimes triggered by the code now, and I haven't yet looked into
the issue -- doesn't seem to harm, at least.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26828 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc128a4c7662c046a4acc0e2907f36e80d6c1792 31-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Made block_io.h usable from C++ (which doesn't like "typedef a *a" anymore).
* Renamed scsi_dsk to scsi_disk.
* Joined all scsi_disk sources together to a single scsi_disk.cpp file.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25737 a95241bf-73f2-0310-859d-f6bbb57e9c96