Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/23] nvmet: add context annotation for params in struct nvmet_ns
@ 2026-11-09  3:28 Nilay Shroff
  2026-11-09  3:28 ` [PATCH 01/23] nvmet: add context annotation for nvmet_ns::bdev Nilay Shroff
                   ` (22 more replies)
  0 siblings, 23 replies; 44+ messages in thread
From: Nilay Shroff @ 2026-11-09  3:28 UTC (permalink / raw)
  To: kbusch, hch, sagi, axboe, chaitanyak
  Cc: gjoyce, bvanassche, elver, linux-nvme, Nilay Shroff

Hi,

This series adds Clang context annotations to fields in struct nvmet_ns
that are protected by nvmet_subsys::lock.

The goal is to incrementally introduce context annotations throughout
the NVMe target code. Covering the entire nvmet subsystem in a single
series would result in a very large patchset with dozens of patches,
making focused review difficult. To keep the changes manageable, I have
split the work into multiple series, each focusing on a specific subset
of context annotations.

This series focuses on fields in struct nvmet_ns protected by
nvmet_subsys::lock. Subsequent series will expand the scope to other
structures and locks.

The patches are organized so that each field is handled incrementally:
first, a field is annotated with __guarded_by(&subsys->lock), and then
any access violations reported by the Clang context analyzer are
addressed in follow-up patches. Not every field annotation necessarily
triggers analyzer warnings. In such cases, the series simply moves on
to the next field.

This approach keeps individual patches focused and makes it easier to
review the annotations and the corresponding locking changes
independently.

As always, review feedback, comments, and suggestions are very welcome!

Nilay Shroff (23):
  nvmet: add context annotation for nvmet_ns::bdev
  nvmet: fix nvmet_ns::bdev access using nvmet_subsys::lock
  nvmet: add context annotation for nvmet_ns::file
  nvmet: add context annotation for nvmet_ns::bdev_file
  nvmet: add context annotation for nvmet_ns::readonly
  nvmet: add context annotation for nvmet_ns::nsid
  nvmet: fix nvmet_ns::nsid access using nvmet_subsys::lock
  nvmet: add context annotation for nvmet_ns::blksize_shift
  nvmet: add context annotation for nvmet_ns::size
  nvmet: add context annotation for nvmet_ns::nguid
  nvmet: add context annotation for nvmet_ns::uuid
  nvmet: fix nvmet_ns::uuid access using nvmet_subsys::lock
  nvmet: add context annotation for nvmet_ns::buffered_io
  nvmet: fix nvmet_ns::buffered_io access using nvmet_subsys::lock
  nvmet: add context annotation for nvmet_ns::enabled
  nvmet: fix access to nvmet_ns::enable using nvmet_subsys::lock
  nvmet: add context annotation for nvmet_ns::device_path
  nvmet: fix nvmet_ns::device_path access using nvmet_subsys::lock
  nvmet: add context annotation for PCI P2P parameters in struct
    nvmet_ns
  nvmet: fix PCI P2P parameters access using nvmet_subsys::lock
  nvmet: add context annotation for integrity params in struct nvmet_ns
  nvmet: add context annotation for nvmet_ns::csi
  nvmet: add context annotation for nvmet_ns::debugfs_dir

 drivers/nvme/target/admin-cmd.c   | 143 ++++++++++++------
 drivers/nvme/target/configfs.c    |  52 ++++++-
 drivers/nvme/target/core.c        |  66 +++++++--
 drivers/nvme/target/debugfs.h     |   6 +-
 drivers/nvme/target/io-cmd-bdev.c |  30 ++--
 drivers/nvme/target/io-cmd-file.c |  49 +++---
 drivers/nvme/target/nvmet.h       | 237 +++++++++++++++++++-----------
 drivers/nvme/target/rdma.c        |   4 +-
 drivers/nvme/target/trace.h       |   2 +-
 drivers/nvme/target/zns.c         |  46 +++---
 10 files changed, 431 insertions(+), 204 deletions(-)


base-commit: 687f3014afcd5826fa3d8f40b445f647b5a379b6
-- 
2.53.0



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

end of thread, other threads:[~2026-11-12 17:36 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09  3:28 [PATCH 00/23] nvmet: add context annotation for params in struct nvmet_ns Nilay Shroff
2026-11-09  3:28 ` [PATCH 01/23] nvmet: add context annotation for nvmet_ns::bdev Nilay Shroff
2026-11-09 20:09   ` sashiko-bot
2026-11-09 21:46   ` Bart Van Assche
2026-11-10  6:38     ` Nilay Shroff
2026-11-10 17:29       ` Bart Van Assche
2026-11-11  7:25         ` Nilay Shroff
2026-11-11 18:00           ` Bart Van Assche
2026-11-12  9:04             ` Nilay Shroff
2026-11-12 17:35               ` Bart Van Assche
2026-11-09  3:28 ` [PATCH 02/23] nvmet: fix nvmet_ns::bdev access using nvmet_subsys::lock Nilay Shroff
2026-11-09 20:15   ` sashiko-bot
2026-11-09 21:47   ` Bart Van Assche
2026-11-10  6:49     ` Nilay Shroff
2026-11-09  3:28 ` [PATCH 03/23] nvmet: add context annotation for nvmet_ns::file Nilay Shroff
2026-11-09 20:20   ` sashiko-bot
2026-11-09 21:53   ` Bart Van Assche
2026-11-10  7:12     ` Nilay Shroff
2026-11-09  3:28 ` [PATCH 04/23] nvmet: add context annotation for nvmet_ns::bdev_file Nilay Shroff
2026-11-09  3:28 ` [PATCH 05/23] nvmet: add context annotation for nvmet_ns::readonly Nilay Shroff
2026-11-09  3:28 ` [PATCH 06/23] nvmet: add context annotation for nvmet_ns::nsid Nilay Shroff
2026-11-09 21:56   ` Bart Van Assche
2026-11-10  8:50     ` Nilay Shroff
2026-11-09  3:28 ` [PATCH 07/23] nvmet: fix nvmet_ns::nsid access using nvmet_subsys::lock Nilay Shroff
2026-11-09  3:28 ` [PATCH 08/23] nvmet: add context annotation for nvmet_ns::blksize_shift Nilay Shroff
2026-11-09  3:28 ` [PATCH 09/23] nvmet: add context annotation for nvmet_ns::size Nilay Shroff
2026-11-09  3:28 ` [PATCH 10/23] nvmet: add context annotation for nvmet_ns::nguid Nilay Shroff
2026-11-09  3:28 ` [PATCH 11/23] nvmet: add context annotation for nvmet_ns::uuid Nilay Shroff
2026-11-09 21:58   ` Bart Van Assche
2026-11-10  9:01     ` Nilay Shroff
2026-11-09  3:28 ` [PATCH 12/23] nvmet: fix nvmet_ns::uuid access using nvmet_subsys::lock Nilay Shroff
2026-11-09  3:28 ` [PATCH 13/23] nvmet: add context annotation for nvmet_ns::buffered_io Nilay Shroff
2026-11-09  3:28 ` [PATCH 14/23] nvmet: fix nvmet_ns::buffered_io access using nvmet_subsys::lock Nilay Shroff
2026-11-09  3:28 ` [PATCH 15/23] nvmet: add context annotation for nvmet_ns::enabled Nilay Shroff
2026-11-09  3:28 ` [PATCH 16/23] nvmet: fix access to nvmet_ns::enable using nvmet_subsys::lock Nilay Shroff
2026-11-09  3:28 ` [PATCH 17/23] nvmet: add context annotation for nvmet_ns::device_path Nilay Shroff
2026-11-09  3:28 ` [PATCH 18/23] nvmet: fix nvmet_ns::device_path access using nvmet_subsys::lock Nilay Shroff
2026-11-09 21:57   ` sashiko-bot
2026-11-09  3:28 ` [PATCH 19/23] nvmet: add context annotation for PCI P2P parameters in struct nvmet_ns Nilay Shroff
2026-11-09  3:28 ` [PATCH 20/23] nvmet: fix PCI P2P parameters access using nvmet_subsys::lock Nilay Shroff
2026-11-09 22:12   ` sashiko-bot
2026-11-09  3:28 ` [PATCH 21/23] nvmet: add context annotation for integrity params in struct nvmet_ns Nilay Shroff
2026-11-09  3:28 ` [PATCH 22/23] nvmet: add context annotation for nvmet_ns::csi Nilay Shroff
2026-11-09  3:28 ` [PATCH 23/23] nvmet: add context annotation for nvmet_ns::debugfs_dir Nilay Shroff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox