mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] nvmet: exit debugfs after discovery subsystem exits
@ 2025-08-07  5:35 Mohamed Khalfella
  2025-08-07  7:19 ` Daniel Wagner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mohamed Khalfella @ 2025-08-07  5:35 UTC (permalink / raw)
  To: Yi Zhang, Christoph Hellwig, Sagi Grimberg, Chaitanya Kulkarni,
	Keith Busch
  Cc: Shinichiro Kawasaki, Mohamed Khalfella, Hannes Reinecke,
	Daniel Wagner, Maurizio Lombardi, Jens Axboe, Randy Jennings,
	linux-nvme, linux-block, linux-kernel

Commit 528589947c180 ("nvmet: initialize discovery subsys after debugfs
is initialized") changed nvmet_init() to initialize nvme discovery after
"nvmet" debugfs directory is initialized. The change broke nvmet_exit()
because discovery subsystem now depends on debugfs. Debugfs should be
destroyed after discovery subsystem. Fix nvmet_exit() to do that.

Reported-by: Yi Zhang <yi.zhang@redhat.com>
Closes: https://lore.kernel.org/all/CAHj4cs96AfFQpyDKF_MdfJsnOEo=2V7dQgqjFv+k3t7H-=yGhA@mail.gmail.com/
Fixes: 528589947c180 ("nvmet: initialize discovery subsys after debugfs is initialized")
Signed-off-by: Mohamed Khalfella <mkhalfella@purestorage.com>
---
 drivers/nvme/target/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 83f3d2f8ef2d0..0dd7bd99afa32 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -1992,8 +1992,8 @@ static int __init nvmet_init(void)
 static void __exit nvmet_exit(void)
 {
 	nvmet_exit_configfs();
-	nvmet_exit_debugfs();
 	nvmet_exit_discovery();
+	nvmet_exit_debugfs();
 	ida_destroy(&cntlid_ida);
 	destroy_workqueue(nvmet_wq);
 	destroy_workqueue(buffered_io_wq);
-- 
2.49.1


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

* Re: [PATCH] nvmet: exit debugfs after discovery subsystem exits
  2025-08-07  5:35 [PATCH] nvmet: exit debugfs after discovery subsystem exits Mohamed Khalfella
@ 2025-08-07  7:19 ` Daniel Wagner
  2025-08-07  8:23 ` Hannes Reinecke
  2025-08-07 12:28 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Wagner @ 2025-08-07  7:19 UTC (permalink / raw)
  To: Mohamed Khalfella
  Cc: Yi Zhang, Christoph Hellwig, Sagi Grimberg, Chaitanya Kulkarni,
	Keith Busch, Shinichiro Kawasaki, Hannes Reinecke,
	Maurizio Lombardi, Jens Axboe, Randy Jennings, linux-nvme,
	linux-block, linux-kernel

On Wed, Aug 06, 2025 at 10:35:07PM -0700, Mohamed Khalfella wrote:
> Commit 528589947c180 ("nvmet: initialize discovery subsys after debugfs
> is initialized") changed nvmet_init() to initialize nvme discovery after
> "nvmet" debugfs directory is initialized. The change broke nvmet_exit()
> because discovery subsystem now depends on debugfs. Debugfs should be
> destroyed after discovery subsystem. Fix nvmet_exit() to do that.
> 
> Reported-by: Yi Zhang <yi.zhang@redhat.com>
> Closes: https://lore.kernel.org/all/CAHj4cs96AfFQpyDKF_MdfJsnOEo=2V7dQgqjFv+k3t7H-=yGhA@mail.gmail.com/
> Fixes: 528589947c180 ("nvmet: initialize discovery subsys after debugfs is initialized")
> Signed-off-by: Mohamed Khalfella <mkhalfella@purestorage.com>

Reviewed-by: Daniel Wagner <dwagner@suse.de>

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

* Re: [PATCH] nvmet: exit debugfs after discovery subsystem exits
  2025-08-07  5:35 [PATCH] nvmet: exit debugfs after discovery subsystem exits Mohamed Khalfella
  2025-08-07  7:19 ` Daniel Wagner
@ 2025-08-07  8:23 ` Hannes Reinecke
  2025-08-07 12:28 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Hannes Reinecke @ 2025-08-07  8:23 UTC (permalink / raw)
  To: Mohamed Khalfella, Yi Zhang, Christoph Hellwig, Sagi Grimberg,
	Chaitanya Kulkarni, Keith Busch
  Cc: Shinichiro Kawasaki, Hannes Reinecke, Daniel Wagner,
	Maurizio Lombardi, Jens Axboe, Randy Jennings, linux-nvme,
	linux-block, linux-kernel

On 8/7/25 07:35, Mohamed Khalfella wrote:
> Commit 528589947c180 ("nvmet: initialize discovery subsys after debugfs
> is initialized") changed nvmet_init() to initialize nvme discovery after
> "nvmet" debugfs directory is initialized. The change broke nvmet_exit()
> because discovery subsystem now depends on debugfs. Debugfs should be
> destroyed after discovery subsystem. Fix nvmet_exit() to do that.
> 
> Reported-by: Yi Zhang <yi.zhang@redhat.com>
> Closes: https://lore.kernel.org/all/CAHj4cs96AfFQpyDKF_MdfJsnOEo=2V7dQgqjFv+k3t7H-=yGhA@mail.gmail.com/
> Fixes: 528589947c180 ("nvmet: initialize discovery subsys after debugfs is initialized")
> Signed-off-by: Mohamed Khalfella <mkhalfella@purestorage.com>
> ---
>   drivers/nvme/target/core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
> index 83f3d2f8ef2d0..0dd7bd99afa32 100644
> --- a/drivers/nvme/target/core.c
> +++ b/drivers/nvme/target/core.c
> @@ -1992,8 +1992,8 @@ static int __init nvmet_init(void)
>   static void __exit nvmet_exit(void)
>   {
>   	nvmet_exit_configfs();
> -	nvmet_exit_debugfs();
>   	nvmet_exit_discovery();
> +	nvmet_exit_debugfs();
>   	ida_destroy(&cntlid_ida);
>   	destroy_workqueue(nvmet_wq);
>   	destroy_workqueue(buffered_io_wq);

Hehe. I knew this would've been the case once I've seen the latest
blktest failure. Thanks for fixing it.

Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich

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

* Re: [PATCH] nvmet: exit debugfs after discovery subsystem exits
  2025-08-07  5:35 [PATCH] nvmet: exit debugfs after discovery subsystem exits Mohamed Khalfella
  2025-08-07  7:19 ` Daniel Wagner
  2025-08-07  8:23 ` Hannes Reinecke
@ 2025-08-07 12:28 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2025-08-07 12:28 UTC (permalink / raw)
  To: Yi Zhang, Christoph Hellwig, Sagi Grimberg, Chaitanya Kulkarni,
	Keith Busch, Mohamed Khalfella
  Cc: Shinichiro Kawasaki, Hannes Reinecke, Daniel Wagner,
	Maurizio Lombardi, Randy Jennings, linux-nvme, linux-block,
	linux-kernel


On Wed, 06 Aug 2025 22:35:07 -0700, Mohamed Khalfella wrote:
> Commit 528589947c180 ("nvmet: initialize discovery subsys after debugfs
> is initialized") changed nvmet_init() to initialize nvme discovery after
> "nvmet" debugfs directory is initialized. The change broke nvmet_exit()
> because discovery subsystem now depends on debugfs. Debugfs should be
> destroyed after discovery subsystem. Fix nvmet_exit() to do that.
> 
> 
> [...]

Applied, thanks!

[1/1] nvmet: exit debugfs after discovery subsystem exits
      commit: 80f21806b8e34ae1e24c0fc6a0f0dfd9b055e130

Best regards,
-- 
Jens Axboe




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

end of thread, other threads:[~2025-08-07 12:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-07  5:35 [PATCH] nvmet: exit debugfs after discovery subsystem exits Mohamed Khalfella
2025-08-07  7:19 ` Daniel Wagner
2025-08-07  8:23 ` Hannes Reinecke
2025-08-07 12:28 ` Jens Axboe

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®