nvmet.h (94a39d61f80fcd679debda11e1ca02b88d90e67e) | nvmet.h (013b7ebe5a0d70e2a02fd225174595e79c591b3e) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (c) 2015-2016 HGST, a Western Digital Company. 4 */ 5 6#ifndef _NVMET_H 7#define _NVMET_H 8 --- 9 unchanged lines hidden (view full) --- 18#include <linux/configfs.h> 19#include <linux/rcupdate.h> 20#include <linux/blkdev.h> 21#include <linux/radix-tree.h> 22 23#define NVMET_ASYNC_EVENTS 4 24#define NVMET_ERROR_LOG_SLOTS 128 25#define NVMET_NO_ERROR_LOC ((u16)-1) | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (c) 2015-2016 HGST, a Western Digital Company. 4 */ 5 6#ifndef _NVMET_H 7#define _NVMET_H 8 --- 9 unchanged lines hidden (view full) --- 18#include <linux/configfs.h> 19#include <linux/rcupdate.h> 20#include <linux/blkdev.h> 21#include <linux/radix-tree.h> 22 23#define NVMET_ASYNC_EVENTS 4 24#define NVMET_ERROR_LOG_SLOTS 128 25#define NVMET_NO_ERROR_LOC ((u16)-1) |
26#define NVMET_DEFAULT_CTRL_MODEL "Linux" |
|
26 27/* 28 * Supported optional AENs: 29 */ 30#define NVMET_AEN_CFG_OPTIONAL \ 31 (NVME_AEN_CFG_NS_ATTR | NVME_AEN_CFG_ANA_CHANGE) 32#define NVMET_DISC_AEN_CFG_OPTIONAL \ 33 (NVME_AEN_CFG_DISC_CHANGE) --- 163 unchanged lines hidden (view full) --- 197 struct device *p2p_client; 198 struct radix_tree_root p2p_ns_map; 199 200 spinlock_t error_lock; 201 u64 err_counter; 202 struct nvme_error_slot slots[NVMET_ERROR_LOG_SLOTS]; 203}; 204 | 27 28/* 29 * Supported optional AENs: 30 */ 31#define NVMET_AEN_CFG_OPTIONAL \ 32 (NVME_AEN_CFG_NS_ATTR | NVME_AEN_CFG_ANA_CHANGE) 33#define NVMET_DISC_AEN_CFG_OPTIONAL \ 34 (NVME_AEN_CFG_DISC_CHANGE) --- 163 unchanged lines hidden (view full) --- 198 struct device *p2p_client; 199 struct radix_tree_root p2p_ns_map; 200 201 spinlock_t error_lock; 202 u64 err_counter; 203 struct nvme_error_slot slots[NVMET_ERROR_LOG_SLOTS]; 204}; 205 |
206struct nvmet_subsys_model { 207 struct rcu_head rcuhead; 208 char number[]; 209}; 210 |
|
205struct nvmet_subsys { 206 enum nvme_subsys_type type; 207 208 struct mutex lock; 209 struct kref ref; 210 211 struct list_head namespaces; 212 unsigned int nr_namespaces; --- 11 unchanged lines hidden (view full) --- 224 u64 ver; 225 u64 serial; 226 char *subsysnqn; 227 228 struct config_group group; 229 230 struct config_group namespaces_group; 231 struct config_group allowed_hosts_group; | 211struct nvmet_subsys { 212 enum nvme_subsys_type type; 213 214 struct mutex lock; 215 struct kref ref; 216 217 struct list_head namespaces; 218 unsigned int nr_namespaces; --- 11 unchanged lines hidden (view full) --- 230 u64 ver; 231 u64 serial; 232 char *subsysnqn; 233 234 struct config_group group; 235 236 struct config_group namespaces_group; 237 struct config_group allowed_hosts_group; |
238 239 struct nvmet_subsys_model __rcu *model; |
|
232}; 233 234static inline struct nvmet_subsys *to_subsys(struct config_item *item) 235{ 236 return container_of(to_config_group(item), struct nvmet_subsys, group); 237} 238 239static inline struct nvmet_subsys *namespaces_to_subsys( --- 274 unchanged lines hidden --- | 240}; 241 242static inline struct nvmet_subsys *to_subsys(struct config_item *item) 243{ 244 return container_of(to_config_group(item), struct nvmet_subsys, group); 245} 246 247static inline struct nvmet_subsys *namespaces_to_subsys( --- 274 unchanged lines hidden --- |