lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55267cdd-c832-45c9-bbe1-9c02473a2269@linux.alibaba.com>
Date: Thu, 5 Sep 2024 17:13:33 +0800
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
To: Chao Yu <chao@...nel.org>, linux-erofs@...ts.ozlabs.org
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/4] erofs: support unencoded inodes for fileio

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,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ