From: JeffleXu <jefflexu@linux.alibaba.com>
To: Jia Zhu <zhujia.zj@bytedance.com>, dhowells@redhat.com, xiang@kernel.org
Cc: linux-cachefs@redhat.com, linux-erofs@lists.ozlabs.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
yinxin.x@bytedance.com
Subject: Re: [PATCH V2 3/5] cachefiles: resend an open request if the read request's object is closed
Date: Fri, 14 Oct 2022 14:31:29 +0800 [thread overview]
Message-ID: <5ca5d4bd-63b4-12e9-39cd-7580958980db@linux.alibaba.com> (raw)
In-Reply-To: <20221014030745.25748-4-zhujia.zj@bytedance.com>
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@linux.alibaba.com>
--
Thanks,
Jingbo
next prev parent reply other threads:[~2022-10-14 6:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 3:07 [PATCH V2 0/5] Introduce daemon failover mechanism to recover from crashing Jia Zhu
2022-10-14 3:07 ` [PATCH V2 1/5] cachefiles: introduce object ondemand state Jia Zhu
2022-10-14 6:31 ` JeffleXu
2022-10-14 3:07 ` [PATCH V2 2/5] cachefiles: extract ondemand info field from cachefiles_object Jia Zhu
2022-10-14 6:32 ` JeffleXu
2022-10-14 3:07 ` [PATCH V2 3/5] cachefiles: resend an open request if the read request's object is closed Jia Zhu
2022-10-14 6:31 ` JeffleXu [this message]
2022-10-14 3:07 ` [PATCH V2 4/5] cachefiles: narrow the scope of triggering EPOLLIN events in ondemand mode Jia Zhu
2022-10-14 6:32 ` JeffleXu
2022-10-14 3:07 ` [PATCH V2 5/5] cachefiles: add restore command to recover inflight ondemand read requests Jia Zhu
2022-10-14 6:33 ` JeffleXu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5ca5d4bd-63b4-12e9-39cd-7580958980db@linux.alibaba.com \
--to=jefflexu@linux.alibaba.com \
--cc=dhowells@redhat.com \
--cc=linux-cachefs@redhat.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xiang@kernel.org \
--cc=yinxin.x@bytedance.com \
--cc=zhujia.zj@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®