All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-devel] [regression] a potential issue for bow_target after "dm: delay registering the gendisk" applied
@ 2022-02-21 10:36 Faqiang Zhu
  2022-02-21 16:42 ` [dm-devel] " Mike Snitzer
  0 siblings, 1 reply; 4+ messages in thread
From: Faqiang Zhu @ 2022-02-21 10:36 UTC (permalink / raw)
  To: hch@lst.de; +Cc: dm-devel@redhat.com, snitzer@redhat.com, agk@redhat.com


[-- Attachment #1.1.1: Type: text/plain, Size: 1192 bytes --]

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?

 

 

Best Regards,

Zhu Faqiang.


[-- Attachment #1.1.2: Type: text/html, Size: 16506 bytes --]

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 9555 bytes --]

[-- Attachment #2: Type: text/plain, Size: 97 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dm-devel] a potential issue for bow_target after "dm: delay registering the gendisk" applied
  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
  2022-02-21 17:10   ` Sweet Tea Dorminy
  2022-02-22  3:06   ` [dm-devel] [EXT] " Faqiang Zhu
  0 siblings, 2 replies; 4+ messages in thread
From: Mike Snitzer @ 2022-02-21 16:42 UTC (permalink / raw)
  To: Faqiang Zhu; +Cc: dm-devel@redhat.com, hch@lst.de, agk@redhat.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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dm-devel] a potential issue for bow_target after "dm: delay registering the gendisk" applied
  2022-02-21 16:42 ` [dm-devel] " Mike Snitzer
@ 2022-02-21 17:10   ` Sweet Tea Dorminy
  2022-02-22  3:06   ` [dm-devel] [EXT] " Faqiang Zhu
  1 sibling, 0 replies; 4+ messages in thread
From: Sweet Tea Dorminy @ 2022-02-21 17:10 UTC (permalink / raw)
  To: dm-devel


On 2/21/22 11:42, Mike Snitzer wrote:
> 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().


Might also be able to just move the sysfs initialization to first 
preresume time, as the out-of-tree module VDO does? 
https://github.com/dm-vdo/kvdo/commit/27bf63255af9e01736ca657df2fa1a03dcf124b8 


Sweet Tea

>
> 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

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dm-devel] [EXT] Re: a potential issue for bow_target after "dm: delay registering the gendisk" applied
  2022-02-21 16:42 ` [dm-devel] " Mike Snitzer
  2022-02-21 17:10   ` Sweet Tea Dorminy
@ 2022-02-22  3:06   ` Faqiang Zhu
  1 sibling, 0 replies; 4+ messages in thread
From: Faqiang Zhu @ 2022-02-22  3:06 UTC (permalink / raw)
  To: Mike Snitzer, Paul Lawrence, Eric Biggers
  Cc: dm-devel@redhat.com, hch@lst.de, agk@redhat.com


[-- Attachment #1.1: Type: text/plain, Size: 2184 bytes --]

Thank you. I just noticed that this is an out-of-tree module.

+ Paul Lawrence & Eric Biggers

Best Regards,
Zhu Faqiang.
-----Original Message-----
From: Mike Snitzer <snitzer@redhat.com> 
Sent: 2022年2月22日 0:43
To: Faqiang Zhu <faqiang.zhu@nxp.com>
Cc: hch@lst.de; agk@redhat.com; dm-devel@redhat.com
Subject: [EXT] Re: a potential issue for bow_target after "dm: delay
registering the gendisk" applied

Caution: EXT Email

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


[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 9555 bytes --]

[-- Attachment #2: Type: text/plain, Size: 97 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-22  9:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [dm-devel] " Mike Snitzer
2022-02-21 17:10   ` Sweet Tea Dorminy
2022-02-22  3:06   ` [dm-devel] [EXT] " Faqiang Zhu

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.