All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Faqiang Zhu <faqiang.zhu@nxp.com>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>,
	"hch@lst.de" <hch@lst.de>, "agk@redhat.com" <agk@redhat.com>
Subject: Re: [dm-devel] a potential issue for bow_target after "dm: delay registering the gendisk" applied
Date: Mon, 21 Feb 2022 11:42:41 -0500	[thread overview]
Message-ID: <YhPBAc9tnJ1iuPbM@redhat.com> (raw)
In-Reply-To: <AM9PR04MB811322427E328C435FE9489FED3A9@AM9PR04MB8113.eurprd04.prod.outlook.com>

On Mon, Feb 21 2022 at  5:36P -0500,
Faqiang Zhu <faqiang.zhu@nxp.com> wrote:

> Hi Christoph,
> 
>  
> 
> Recently when I use kernel5.15 with android, an issue related to bow_target
> is found with below log:
> 
>  
> 
> [    8.935429][    T1] kobject_add_internal failed for bow (error: -2
> parent: (null))
> 
>  
> 
> The call trace to the preceding log is as below:
> 
> dm_ctl_ioctl
> 
>  -> ctl_ioctl
> 
>    -> lookup_ioctl    // returns the table_load function pointer
> 
>       table_load
> 
>         -> populate_table
> 
>              -> dm_table_add_target
> 
>                   -> dm_bow_ctr
> 
>                        -> kobject_init_and_add
> 
>                             -> kobject_add_varg
> 
>                                  -> kobject_add_internal
> 
>  
> 
>  
> 
> Compared to kernel5.10, then I found it's related to below patch. The
> gendisk, it's not registered yet, its kobject is not in sysfs, so its child
> "bow" kobject cannot be added to the kernel.
> 
> commit 89f871af1b26d98d983cba7ed0e86effa45ba5f8
> 
> Author: Christoph Hellwig  <mailto:hch@lst.de> hch@lst.de
> 
> Date:   Wed Aug 4 11:41:46 2021 +0200
> 
>  
> 
>     dm: delay registering the gendisk
> 
>  
> 
>  
> 
> Is this an issue? if it is, is there any patch to fix it? if it is not, then
> what is the right way to use the bow_target in userspace?
> 

It is an issue for this out-of-tree dm-bow target.  Likely needs to be
fixed by adding a new DM target operation to 'struct target_type' that
would get called by DM core at end of dm_setup_md_queue().

Or dm-bow discontinues using sysfs for whatever and convert to using
DM messages (with .message) and exposing associated state via .status

Mike

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


  reply	other threads:[~2022-02-21 16:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 10:36 [dm-devel] [regression] a potential issue for bow_target after "dm: delay registering the gendisk" applied Faqiang Zhu
2022-02-21 16:42 ` Mike Snitzer [this message]
2022-02-21 17:10   ` [dm-devel] " Sweet Tea Dorminy
2022-02-22  3:06   ` [dm-devel] [EXT] " Faqiang 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=YhPBAc9tnJ1iuPbM@redhat.com \
    --to=snitzer@redhat.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=faqiang.zhu@nxp.com \
    --cc=hch@lst.de \
    /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.