Reply in line
- } else {
struct vring_list *p_sg = &sg[1];
Not needed, you can just use sg[1].addr Andy: I used to think sg[1]. Length, but I am not sure. Could you please tell me why sg[1]. Length is not needed ?
void *p = op->buf_fl;
u16 count = op->count;
while (count > blk_num_max) {
while (count > 0) { u16 blk_num = min(count, blk_num_max);
} else {
break;
}
}
if (status != VIRTIO_BLK_S_OK)
return DISK_RET_EBADTRACK;
Can be moved into the while loop, you don't need the break then. Andy: OK, address it in V4.
if (count > 0) {
p_sg->addr = p;
p_sg->length = vdrive->drive.blksize * count;
virtio_blk_op_one_segment(vdrive, write, sg);
}
Not needed with the change above. Andy: OK, address it in V4.
take care, Gerd