Block devices.
Definition in file blockdev.c.
Read from block device.
- Parameters
-
control | Control interface |
data | Data interface |
lba | Starting logical block address |
count | Number of logical blocks |
buffer | Data buffer |
len | Length of data buffer |
- Return values
-
Definition at line 47 of file blockdev.c.
struct arbelprm_rc_send_wqe rc
int block_read(struct interface *control, struct interface *data, uint64_t lba, unsigned int count, userptr_t buffer, size_t len)
Read from block device.
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
void * intf_object(struct interface *intf)
Get pointer to object containing object interface.
#define block_read_TYPE(object_type)
uint16_t count
Number of entries.
#define EOPNOTSUPP
Operation not supported on socket.
uint64_t lba
Starting block number.
static uint16_t struct vmbus_xfer_pages_operations * op
void intf_put(struct interface *intf)
Decrement reference count on an object interface.
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
uint8_t data[48]
Additional event data.
#define intf_get_dest_op(intf, type, dest)
Get object interface destination and operation method.
References block_read(), block_read_TYPE, buffer, control, count, data, dest, EOPNOTSUPP, intf_get_dest_op, intf_object(), intf_put(), lba, len, op, and rc.
Referenced by block_read(), and sandev_read().
Write to block device.
- Parameters
-
control | Control interface |
data | Data interface |
lba | Starting logical block address |
count | Number of logical blocks |
buffer | Data buffer |
len | Length of data buffer |
- Return values
-
Definition at line 78 of file blockdev.c.
int block_write(struct interface *control, struct interface *data, uint64_t lba, unsigned int count, userptr_t buffer, size_t len)
Write to block device.
struct arbelprm_rc_send_wqe rc
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
void * intf_object(struct interface *intf)
Get pointer to object containing object interface.
uint16_t count
Number of entries.
#define EOPNOTSUPP
Operation not supported on socket.
uint64_t lba
Starting block number.
#define block_write_TYPE(object_type)
static uint16_t struct vmbus_xfer_pages_operations * op
void intf_put(struct interface *intf)
Decrement reference count on an object interface.
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
uint8_t data[48]
Additional event data.
#define intf_get_dest_op(intf, type, dest)
Get object interface destination and operation method.
References block_write(), block_write_TYPE, buffer, control, count, data, dest, EOPNOTSUPP, intf_get_dest_op, intf_object(), intf_put(), lba, len, op, and rc.
Referenced by block_write(), and sandev_write().
Read block device capacity.
- Parameters
-
control | Control interface |
data | Data interface |
- Return values
-
Definition at line 105 of file blockdev.c.
#define block_read_capacity_TYPE(object_type)
struct arbelprm_rc_send_wqe rc
void * intf_object(struct interface *intf)
Get pointer to object containing object interface.
#define EOPNOTSUPP
Operation not supported on socket.
static uint16_t struct vmbus_xfer_pages_operations * op
void intf_put(struct interface *intf)
Decrement reference count on an object interface.
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
uint8_t data[48]
Additional event data.
int block_read_capacity(struct interface *control, struct interface *data)
Read block device capacity.
#define intf_get_dest_op(intf, type, dest)
Get object interface destination and operation method.
References block_read_capacity(), block_read_capacity_TYPE, control, data, dest, EOPNOTSUPP, intf_get_dest_op, intf_object(), intf_put(), op, and rc.
Referenced by block_read_capacity(), and sandev_command_read_capacity().
Report block device capacity.
- Parameters
-
intf | Interface |
capacity | Block device capacity |
Definition at line 129 of file blockdev.c.
137 op (
object, capacity );
void block_capacity(struct interface *intf, struct block_device_capacity *capacity)
Report block device capacity.
void * intf_object(struct interface *intf)
Get pointer to object containing object interface.
struct interface * intf
Original interface.
static uint16_t struct vmbus_xfer_pages_operations * op
void intf_put(struct interface *intf)
Decrement reference count on an object interface.
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
#define intf_get_dest_op(intf, type, dest)
Get object interface destination and operation method.
#define block_capacity_TYPE(object_type)
References block_capacity(), block_capacity_TYPE, dest, interface::intf, intf_get_dest_op, intf_object(), intf_put(), and op.
Referenced by atacmd_identify_done(), blktrans_close(), block_capacity(), and scsicmd_read_capacity_done().