[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5ca5d4bd-63b4-12e9-39cd-7580958980db@linux.alibaba.com>
Date: Fri, 14 Oct 2022 14:31:29 +0800
From: JeffleXu <jefflexu@...ux.alibaba.com>
To: Jia Zhu <zhujia.zj@...edance.com>, dhowells@...hat.com,
xiang@...nel.org
Cc: linux-cachefs@...hat.com, linux-erofs@...ts.ozlabs.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
yinxin.x@...edance.com
Subject: Re: [PATCH V2 3/5] cachefiles: resend an open request if the read
request's object is closed
On 10/14/22 11:07 AM, Jia Zhu wrote:
> +/*
> + * Reopen the closed object with associated read request.
I think "Reopen the closed object if there's any inflight or subsequent
READ request on this object" would be better?
> + * Skip read requests whose related object are reopening.
^
is ?
> @@ -277,14 +308,18 @@ ssize_t cachefiles_ondemand_daemon_read(struct cachefiles_cache *cache,
> xa_unlock(&cache->reqs);
>
> id = xas.xa_index;
> - msg->msg_id = id;
>
> if (msg->opcode == CACHEFILES_OP_OPEN) {
> ret = cachefiles_ondemand_get_fd(req);
> - if (ret)
> + if (ret) {
> + cachefiles_ondemand_set_object_close(req->object);
> goto error;
> + }
> }
>
> + msg->msg_id = id;
> + msg->object_id = req->object->private->ondemand_id;
Since currently msg->object_id is always assigned in
cachefiles_ondemand_daemon_read(), we can remove the assignment in
cachefiles_ondemand_get_fd().
Otherwise LGTM.
Reviewed-by: Jingbo Xu <jefflexu@...ux.alibaba.com>
--
Thanks,
Jingbo
Powered by blists - more mailing lists