* block_device.
*/
if (S_ISBLK(fd->f_dentry->d_inode->i_mode)) {
- if (ret < 0 || ret != task->task_size) {
+ if (ret < 0 || ret != task->task_se_cmd->data_length) {
pr_err("vfs_readv() returned %d,"
" expecting %d for S_ISBLK\n", ret,
- (int)task->task_size);
+ (int)task->task_se_cmd->data_length);
return (ret < 0 ? ret : -EINVAL);
}
} else {
kfree(iov);
- if (ret < 0 || ret != task->task_size) {
+ if (ret < 0 || ret != task->task_se_cmd->data_length) {
pr_err("vfs_writev() returned %d\n", ret);
return (ret < 0 ? ret : -EINVAL);
}
struct fd_dev *fd_dev = dev->dev_ptr;
loff_t start = task->task_se_cmd->t_task_lba *
dev->se_sub_dev->se_dev_attrib.block_size;
- loff_t end = start + task->task_size;
+ loff_t end = start + task->task_se_cmd->data_length;
int ret;
pr_debug("FILEIO: FUA WRITE LBA: %llu, bytes: %u\n",
- task->task_se_cmd->t_task_lba, task->task_size);
+ task->task_se_cmd->t_task_lba,
+ task->task_se_cmd->data_length);
ret = vfs_fsync_range(fd_dev->fd_file, start, end, 1);
if (ret != 0)
pr_debug("Allocated bio: %p task_sg_nents: %u using ibd_bio_set:"
" %p\n", bio, task->task_sg_nents, ib_dev->ibd_bio_set);
- pr_debug("Allocated bio: %p task_size: %u\n", bio, task->task_size);
+ pr_debug("Allocated bio: %p task_size: %u\n", bio,
+ task->task_se_cmd->data_length);
bio->bi_bdev = ib_dev->ibd_bd;
bio->bi_private = task;
struct bio *bio = NULL, *tbio = NULL;
struct page *page;
struct scatterlist *sg;
- u32 data_len = task->task_size, i, len, bytes, off;
- int nr_pages = (task->task_size + task_sg[0].offset +
+ u32 data_len = cmd->data_length, i, len, bytes, off;
+ int nr_pages = (cmd->data_length + task_sg[0].offset +
PAGE_SIZE - 1) >> PAGE_SHIFT;
int nr_vecs = 0, rc;
int rw = (task->task_data_direction == DMA_TO_DEVICE);
return -ENODEV;
}
} else {
- BUG_ON(!task->task_size);
+ BUG_ON(!cmd->data_length);
/*
* Setup the main struct request for the task->task_sg[] payload
se_dev->se_sub_dev->se_dev_attrib.block_size;
rd_offset = do_div(tmp, PAGE_SIZE);
rd_page = tmp;
- rd_size = task->task_size;
+ rd_size = task->task_se_cmd->data_length;
table = rd_get_sg_table(dev, rd_page);
if (!table)
task->task_sg = cmd_sg;
task->task_sg_nents = sgl_nents;
- task->task_size = cmd->data_length;
task->task_sectors = sectors;
return -ENOMEM;
task->task_sg = cmd->t_data_sg;
- task->task_size = cmd->data_length;
task->task_sg_nents = cmd->t_data_nents;
spin_lock_irqsave(&cmd->t_state_lock, flags);
struct se_task {
u32 task_sectors;
- u32 task_size;
struct se_cmd *task_se_cmd;
struct scatterlist *task_sg;
u32 task_sg_nents;