summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorNilay Shroff <nilay@linux.ibm.com>2026-09-18 21:57:30 +0530
committerKeith Busch <kbusch@kernel.org>2026-09-25 08:06:21 -0700
commit42b0f5196dc2f2113368993317eccbfd1127f298 (patch)
tree63239d55ff3bc78184de8727af80ea75c6373621 /tools/lib/python/kdoc/python_version.py
parent5211fed41d7ec90e9ab7239dc4bffffe4d0b2b62 (diff)
downloadlinux-next-42b0f5196dc2f2113368993317eccbfd1127f298.tar.gz
linux-next-42b0f5196dc2f2113368993317eccbfd1127f298.zip
nvmet: defer setting ns->enabled to false in nvmet_ns_disable()
nvmet_ns_disable() currently clears ns->enabled before draining in-flight I/O references. This allows namespace configuration to be changed while existing I/O requests can still hold a reference to the namespace. This can race with configuration of namespace attributes such as the device path, UUID, NGUID etc. These attributes can be accessed by I/O requests without holding subsys->lock and must not be modified while such requests are still using the namespace. In nvmet_ns_disable(), keep ns->enabled set while existing namespace references are being drained, so namespace configuration remains blocked until all in-flight I/O has completed. Set ns->enabled to false only after the namespace references have been drained and the namespace device has been disabled. Introduce the NVMET_NS_IO_LIVE flag, which is set after the namespace is successfully enabled in nvmet_ns_enable(). When nvmet_ns_disable() starts, clear NVMET_NS_IO_LIVE so that the I/O path stops admitting new I/O once the flag is cleared. Using test_and_clear_bit() in nvmet_ns_disable() also prevents concurrent callers from starting a second disable operation. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions