[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230406135014.75466-1-frank.li@vivo.com>
Date: Thu, 6 Apr 2023 21:50:14 +0800
From: Yangtao Li <frank.li@...o.com>
To: frank.li@...o.com
Cc: chao@...nel.org, damien.lemoal@...nsource.wdc.com,
gregkh@...uxfoundation.org, huyue2@...lpad.com,
jefflexu@...ux.alibaba.com, jth@...nel.org,
linux-erofs@...ts.ozlabs.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, naohiro.aota@....com,
rafael@...nel.org, xiang@...nel.org
Subject: Re: [PATCH 2/3] erofs: convert to use kobject_is_added()
> > Meta-comment, we need to come up with a "filesystem kobject type" to get
> > rid of lots of the boilerplate filesystem kobject logic as it's
> > duplicated in every filesystem in tiny different ways and lots of times
> > (like here), it's wrong.
>
> Can we add the following structure?
>
> struct filesystem_kobject {
> struct kobject kobject;
> struct completion unregister;
> };
>
> w/ it, we can simplify something:
>
> 1. merge init_completion and kobject_init_and_add
>
> 2. merge kobject_put and wait_for_completion
>
> 3. we can have a common release func for kobj_type release
It seems that the above ideas are not crazy enough, maybe we should do more.
Any ideas and suggestions are very welcome.
MBR,
Yangtao
Powered by blists - more mailing lists