[PATCH v2 2/4] erofs: support unencoded inodes for fileio
Gao Xiang
hsiangkao at linux.alibaba.com
Thu Sep 5 19:13:33 AEST 2024
Hi Chao,
On 2024/9/5 17:01, Chao Yu wrote:
> On 2024/8/30 11:28, Gao Xiang wrote:
..
>> +
>> +static void erofs_fileio_rq_submit(struct erofs_fileio_rq *rq)
>> +{
>> + struct iov_iter iter;
>> + int ret;
>> +
>> + if (!rq)
>> + return;
>> + rq->iocb.ki_pos = rq->bio.bi_iter.bi_sector << 9;
>
> Trivial cleanup,
>
> rq->iocb.ki_pos = rq->bio.bi_iter.bi_sector << SECTOR_SHIFT;
Will send a quick fix version.
>
>> + rq->iocb.ki_ioprio = get_current_ioprio();
>> + rq->iocb.ki_complete = erofs_fileio_ki_complete;
>> + rq->iocb.ki_flags = (rq->iocb.ki_filp->f_mode & FMODE_CAN_ODIRECT) ?
>> + IOCB_DIRECT : 0;
>> + iov_iter_bvec(&iter, ITER_DEST, rq->bvecs, rq->bio.bi_vcnt,
>> + rq->bio.bi_iter.bi_size);
>> + ret = vfs_iocb_iter_read(rq->iocb.ki_filp, &rq->iocb, &iter);
>> + if (ret != -EIOCBQUEUED)
>> + erofs_fileio_ki_complete(&rq->iocb, ret);
>
> Shouldn't we pass return value to caller?
I don't think it's needed. Since ki_complete will handle error cases
for both (a)sync I/Os.
Thanks,
Gao Xiang
>
> Thanks,
>
More information about the Linux-erofs
mailing list