mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v6 0/4] nvmet: avoid recursive configfs open
@ 2026-09-26  9:21 Runyu Xiao
  2026-09-26  9:21 ` [PATCH v6 1/4] fs: configfs: add helpers for opening non-configfs paths Runyu Xiao
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Runyu Xiao @ 2026-09-26  9:21 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Breno Leitao, Andreas Hindborg, Sagi Grimberg,
	Chaitanya Kulkarni, Keith Busch, Logan Gunthorpe,
	Martin K. Petersen, Lee Duncan, Hannes Reinecke,
	Nicholas Bellinger, linux-nvme, linux-scsi, target-devel,
	linux-kernel, stable, Runyu Xiao, Jianhao Xu

Several configfs store callbacks open user-configured paths while holding
the item's frag_sem.  If a configured path resolves into configfs, the open
can re-enter __configfs_open_file() and try to acquire the same
non-recursive semaphore again.

Add helpers in configfs for opening non-configfs paths, then use them in the
nvmet file-backed namespace and passthru paths.  The series also pins the
target-core db_root path and uses the root-relative helper for ALUA and APTPL
metadata, so the helper has its target-core consumer in the same series.

Changes since v5:
- Add the target-core db_root patch as 4/4 and use configfs_open_root() for
  validation and metadata opens.
- Replace the verbose helper kerneldoc with concise interface descriptions.
- Keep the Reviewed-by tags on the unchanged nvmet patches.

Runyu Xiao (4):
  fs: configfs: add helpers for opening non-configfs paths
  nvmet: avoid recursive configfs open for file-backed namespaces
  nvmet: avoid recursive configfs open for passthru
  scsi: target: pin db_root for metadata writes

 drivers/nvme/target/io-cmd-file.c     |   3 +-
 drivers/nvme/target/passthru.c        |   3 +-
 drivers/target/target_core_alua.c     |  42 +++++-----
 drivers/target/target_core_configfs.c | 116 ++++++++++++++++++++------
 drivers/target/target_core_internal.h |   3 +
 drivers/target/target_core_pr.c       |  21 +++--
 fs/configfs/mount.c                   |  53 ++++++++++++
 include/linux/configfs.h              |   5 ++
 8 files changed, 189 insertions(+), 57 deletions(-)


base-commit: df2908090cda368b01ff43709f51890076c56157
-- 
2.34.1

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

end of thread, other threads:[~2026-09-28 15:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-26  9:21 [PATCH v6 0/4] nvmet: avoid recursive configfs open Runyu Xiao
2026-09-26  9:21 ` [PATCH v6 1/4] fs: configfs: add helpers for opening non-configfs paths Runyu Xiao
2026-09-26  9:21 ` [PATCH v6 2/4] nvmet: avoid recursive configfs open for file-backed namespaces Runyu Xiao
2026-09-26  9:21 ` [PATCH v6 3/4] nvmet: avoid recursive configfs open for passthru Runyu Xiao
2026-09-28 15:50   ` Logan Gunthorpe
2026-09-26  9:21 ` [PATCH v6 4/4] scsi: target: pin db_root for metadata writes Runyu Xiao

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®