class BlockDevice
Defined at line 46 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
|BlockDevice| represents a single SCSI direct access block device.
|BlockDevice| bridges between the Zircon block protocol and SCSI commands/responses.
Public Methods
zx::result<std::unique_ptr<BlockDevice>> Bind (Controller * controller, uint8_t target, uint16_t lun, uint32_t max_transfer_bytes, DeviceOptions device_options)
Create a BlockDevice at a specific target/lun.
|controller| is a pointer to the scsi::Controller this BlockDevice is attached to.
|controller| must outlast BlockDevice.
This BlockDevice does not take ownership of or any references on |controller|.
A |max_transfer_bytes| value of fuchsia_storage_block::wire::kMaxTransferUnbounded implies
there is no limit on the transfer size.
Returns a BlockDevice* to allow for removal of removable media disks.
Defined at line 20 of file ../../src/devices/block/lib/scsi/block-device.cc
void BlockDevice (Controller * controller, uint8_t target, uint16_t lun, DeviceOptions device_options)
Public so that we can use make_unique.
Clients should use BlockDevice::Bind().
Defined at line 50 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
void RemoveDevice ()
Remove this block device.
Defined at line 65 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
fbl::String DeviceName ()
Defined at line 72 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
uint8_t target ()
Defined at line 80 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
uint16_t lun ()
Defined at line 81 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
bool removable ()
Defined at line 83 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
bool dpo_fua_available ()
Defined at line 84 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
bool write_protected ()
Defined at line 85 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
bool write_cache_enabled ()
Defined at line 86 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
uint64_t block_count ()
Defined at line 87 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
uint32_t block_size_bytes ()
Defined at line 88 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
uint32_t max_transfer_bytes ()
Defined at line 89 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
void BlockDevice (const BlockDevice & )
Defined at line 91 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
BlockDevice & operator= (const BlockDevice & )
Defined at line 92 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
DeviceOptions & GetDeviceOptions ()
for test
Defined at line 95 of file ../../src/devices/block/lib/scsi/include/lib/scsi/block-device.h
void BlockImplQuery (block_info_t * info_out, size_t * block_op_size_out)
ddk::BlockImplProtocol functions.
Defined at line 212 of file ../../src/devices/block/lib/scsi/block-device.cc
void BlockImplQueue (block_op_t * operation, block_impl_queue_callback completion_cb, void * cookie)
Defined at line 222 of file ../../src/devices/block/lib/scsi/block-device.cc