Lines Matching refs:nsid

67 		req->error_loc = offsetof(struct nvme_rw_command, nsid);  in errno_to_nvme_status()
121 u32 nsid = 0; in nvmet_max_nsid() local
124 nsid = cur->nsid; in nvmet_max_nsid()
126 return nsid; in nvmet_max_nsid()
211 static void nvmet_add_to_changed_ns_log(struct nvmet_ctrl *ctrl, __le32 nsid) in nvmet_add_to_changed_ns_log() argument
220 if (ctrl->changed_ns_list[i] == nsid) in nvmet_add_to_changed_ns_log()
230 ctrl->changed_ns_list[ctrl->nr_changed_ns++] = nsid; in nvmet_add_to_changed_ns_log()
235 void nvmet_ns_changed(struct nvmet_subsys *subsys, u32 nsid) in nvmet_ns_changed() argument
242 nvmet_add_to_changed_ns_log(ctrl, cpu_to_le32(nsid)); in nvmet_ns_changed()
421 u32 nsid = le32_to_cpu(req->cmd->common.nsid); in nvmet_req_find_ns() local
423 req->ns = xa_load(&nvmet_req_subsys(req)->namespaces, nsid); in nvmet_req_find_ns()
425 req->error_loc = offsetof(struct nvme_common_command, nsid); in nvmet_req_find_ns()
526 ret = radix_tree_insert(&ctrl->p2p_ns_map, ns->nsid, p2p_dev); in nvmet_p2pmem_ns_add_p2p()
531 ns->nsid); in nvmet_p2pmem_ns_add_p2p()
544 nvmet_ns_changed(ns->subsys, ns->nsid); in nvmet_ns_revalidate()
586 if (ns->nsid > subsys->max_nsid) in nvmet_ns_enable()
587 subsys->max_nsid = ns->nsid; in nvmet_ns_enable()
589 ret = xa_insert(&subsys->namespaces, ns->nsid, ns, GFP_KERNEL); in nvmet_ns_enable()
595 nvmet_ns_changed(subsys, ns->nsid); in nvmet_ns_enable()
607 pci_dev_put(radix_tree_delete(&ctrl->p2p_ns_map, ns->nsid)); in nvmet_ns_enable()
623 xa_erase(&ns->subsys->namespaces, ns->nsid); in nvmet_ns_disable()
624 if (ns->nsid == subsys->max_nsid) in nvmet_ns_disable()
628 pci_dev_put(radix_tree_delete(&ctrl->p2p_ns_map, ns->nsid)); in nvmet_ns_disable()
648 nvmet_ns_changed(subsys, ns->nsid); in nvmet_ns_disable()
666 struct nvmet_ns *nvmet_ns_alloc(struct nvmet_subsys *subsys, u32 nsid) in nvmet_ns_alloc() argument
676 ns->nsid = nsid; in nvmet_ns_alloc()
727 new_error_slot->nsid = req->cmd->common.nsid; in nvmet_set_error()
881 req->error_loc = offsetof(struct nvme_common_command, nsid); in nvmet_parse_io_cmd()
886 req->error_loc = offsetof(struct nvme_common_command, nsid); in nvmet_parse_io_cmd()
1037 return radix_tree_lookup(&req->sq->ctrl->p2p_ns_map, req->ns->nsid); in nvmet_req_find_p2p_dev()