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: [RFC PATCH 2/5] cachefiles: extract ondemand info field from cachefiles_object
Date: Sat, 8 Oct 2022 17:06:31 +0800 [thread overview]
Message-ID: <4fbf60f5-4ed1-3dd8-e4d3-de796e701956@linux.alibaba.com> (raw)
In-Reply-To: <20220818135204.49878-3-zhujia.zj@bytedance.com>
On 8/18/22 9:52 PM, Jia Zhu wrote:
> /*
> * Backing file state.
> */
> @@ -67,8 +73,7 @@ struct cachefiles_object {
> unsigned long flags;
> #define CACHEFILES_OBJECT_USING_TMPFILE 0 /* Have an unlinked tmpfile */
> #ifdef CONFIG_CACHEFILES_ONDEMAND
> - int ondemand_id;
> - enum cachefiles_object_state state;
> + void *private;
> #endif
> };
Personally I would prefer
struct cachefiles_object {
...
#ifdef CONFIG_CACHEFILES_ONDEMAND
struct cachefiles_ondemand_info *private;
#endif
}
and
> @@ -88,6 +93,7 @@ void cachefiles_put_object(struct cachefiles_object
*object,
> ASSERTCMP(object->file, ==, NULL);
>
> kfree(object->d_name);
> + #ifdef CONFIG_CACHEFILES_ONDEMAND
> + kfree(object->private);
> + #endif
>
> cache = object->volume->cache->cache;
> fscache_put_cookie(object->cookie,
so that we can get rid of CACHEFILES_ONDEMAND_OBJINFO() stuff, to make
the code more readable.
--
Thanks,
Jingbo
next prev parent reply other threads:[~2022-10-08 9:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 13:51 [RFC PATCH 0/5] Introduce daemon failover mechanism to recover from crashing Jia Zhu
2022-08-18 13:52 ` [RFC PATCH 1/5] cachefiles: introduce object ondemand state Jia Zhu
2022-08-18 13:52 ` [RFC PATCH 2/5] cachefiles: extract ondemand info field from cachefiles_object Jia Zhu
2022-10-08 9:06 ` JeffleXu [this message]
2022-10-09 9:50 ` [External] " Jia Zhu
2022-08-18 13:52 ` [RFC PATCH 3/5] cachefiles: resend an open request if the read request's object is closed Jia Zhu
2022-10-08 9:05 ` JeffleXu
2022-10-09 12:49 ` [External] " Jia Zhu
2022-08-18 13:52 ` [RFC PATCH 4/5] cachefiles: narrow the scope of triggering EPOLLIN events in ondemand mode Jia Zhu
2022-08-18 13:52 ` [RFC PATCH 5/5] cachefiles: add restore command to recover inflight ondemand read requests Jia Zhu
2022-10-08 9:00 ` JeffleXu
2022-10-09 9:52 ` [External] " Jia Zhu
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=4fbf60f5-4ed1-3dd8-e4d3-de796e701956@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®