From: Greg KH <gregkh@linuxfoundation.org>
To: Alexander Aring <aahringo@redhat.com>
Cc: teigland@redhat.com, gfs2@lists.linux.dev, song@kernel.org,
yukuai3@huawei.com, agruenba@redhat.com, mark@fasheh.com,
jlbec@evilplan.org, joseph.qi@linux.alibaba.com,
rafael@kernel.org, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org,
ocfs2-devel@lists.linux.dev, lucien.xin@gmail.com
Subject: Re: [RFC dlm/next 09/12] kobject: export generic helper ops
Date: Thu, 15 Aug 2024 07:28:02 +0200 [thread overview]
Message-ID: <2024081519-caddy-monstrous-b37d@gregkh> (raw)
In-Reply-To: <CAK-6q+hN8ZRAHc7aS7C_RO4pEGN1t3eA_vDChsSgsQOcJEU4vg@mail.gmail.com>
On Wed, Aug 14, 2024 at 04:47:28PM -0400, Alexander Aring wrote:
> Hi,
>
> On Wed, Aug 14, 2024 at 11:06 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Wed, Aug 14, 2024 at 10:34:11AM -0400, Alexander Aring wrote:
> > > This patch exports generic helpers like kset_release() and
> > > kset_get_ownership() so users can use them in their own struct kobj_type
> > > implementation instead of implementing their own functions that do the
> > > same.
> >
> > Why is anyone needing these? What raw kobjects require this type of
> > stuff?
> >
>
> In this patch series I introduced kset_type_create_and_add() to have
> the possibility to do the exact same what kset_create_and_add() is
> doing, just setting a different "struct kobj_type", for the kset that
> is created internally by kset_create_and_add(). I can't use
> kset_create_and_add() as it always uses "kset_ktype", see [0].
>
> I am doing that to have only a callback for ".child_ns_type" assigned
> as it returns the "&net_ns_type_operations;" structure to tell
> underneath everything is separated by net namespaces.
> I don't want to change anything else so the "struct kobj_type" should
> look like what kset_create_and_add() is doing. Therefore I am creating
> the same structure as kset_create_and_add() is using, see [0]. The
> "kobj_sysfs_ops" structure seems to be already accessible from
> outside, just the two functions I am exporting in this patch are
> missing. Or I implement it in the same way in the dlm/gfs2 codebase
> (that is what nfs is currently doing, see [1]).
>
> And then we are at the two users of those kobjects that are using
> those functions, it's DLM and GFS2 as they used kset_create_and_add()
> before and I just want to add the ".child_ns_type" callback. Other
> users could be nfs [1] (for the release, get_ownership - I have no
> idea).
Ah, makes much more sense, thanks. And ick, network namespaces...
Anyway, feel free to take this through whatever tree the rest of the
series needs to go through:
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
next prev parent reply other threads:[~2024-08-15 5:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 14:34 [RFC dlm/next 00/12] dlm: net-namespace functionality Alexander Aring
2024-08-14 14:34 ` [RFC dlm/next 01/12] dlm: introduce dlm_find_lockspace_name() Alexander Aring
2024-08-14 14:34 ` [RFC dlm/next 02/12] dlm: disallow different configs nodeid storages Alexander Aring
2024-08-14 14:34 ` [RFC dlm/next 03/12] dlm: add struct net to dlm_new_lockspace() Alexander Aring
2024-08-14 14:34 ` [RFC dlm/next 04/12] dlm: handle port as __be16 network byte order Alexander Aring
2024-08-14 14:34 ` [RFC dlm/next 05/12] dlm: use dlm_config as only cluster configuration Alexander Aring
2024-08-14 14:34 ` [RFC dlm/next 06/12] dlm: dlm_config_info config fields to unsigned int Alexander Aring
2024-08-14 14:34 ` [RFC dlm/next 07/12] dlm: rename config to configfs Alexander Aring
2024-08-14 14:34 ` [RFC dlm/next 08/12] kobject: add kset_type_create_and_add() helper Alexander Aring
2024-08-15 13:22 ` kernel test robot
2024-08-24 2:26 ` Greg KH
2024-08-25 19:54 ` Alexander Aring
2024-08-14 14:34 ` [RFC dlm/next 09/12] kobject: export generic helper ops Alexander Aring
2024-08-14 15:05 ` Greg KH
2024-08-14 20:47 ` Alexander Aring
2024-08-15 5:28 ` Greg KH [this message]
2024-08-14 14:34 ` [RFC dlm/next 10/12] dlm: separate dlm lockspaces per net-namespace Alexander Aring
2024-08-14 14:34 ` [RFC dlm/next 11/12] dlm: add nldlm net-namespace aware UAPI Alexander Aring
2024-08-14 14:34 ` [RFC dlm/next 12/12] gfs2: separate mount context by net-namespaces Alexander Aring
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=2024081519-caddy-monstrous-b37d@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=aahringo@redhat.com \
--cc=agruenba@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=gfs2@lists.linux.dev \
--cc=jlbec@evilplan.org \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@lists.linux.dev \
--cc=rafael@kernel.org \
--cc=song@kernel.org \
--cc=teigland@redhat.com \
--cc=yukuai3@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.