linux/drivers/nvme/host/multipath.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2017-2018 Christoph Hellwig.
 */

#include <linux/backing-dev.h>
#include <linux/moduleparam.h>
#include <linux/vmalloc.h>
#include <trace/events/block.h>
#include "nvme.h"

bool multipath =;
module_param(multipath, bool, 0444);
MODULE_PARM_DESC();

static const char *nvme_iopolicy_names[] =;

static int iopolicy =;

static int nvme_set_iopolicy(const char *val, const struct kernel_param *kp)
{}

static int nvme_get_iopolicy(char *buf, const struct kernel_param *kp)
{}

module_param_call();
MODULE_PARM_DESC();

void nvme_mpath_default_iopolicy(struct nvme_subsystem *subsys)
{}

void nvme_mpath_unfreeze(struct nvme_subsystem *subsys)
{}

void nvme_mpath_wait_freeze(struct nvme_subsystem *subsys)
{}

void nvme_mpath_start_freeze(struct nvme_subsystem *subsys)
{}

void nvme_failover_req(struct request *req)
{}

void nvme_mpath_start_request(struct request *rq)
{}
EXPORT_SYMBOL_GPL();

void nvme_mpath_end_request(struct request *rq)
{}

void nvme_kick_requeue_lists(struct nvme_ctrl *ctrl)
{}

static const char *nvme_ana_state_names[] =;

bool nvme_mpath_clear_current_path(struct nvme_ns *ns)
{}

void nvme_mpath_clear_ctrl_paths(struct nvme_ctrl *ctrl)
{}

void nvme_mpath_revalidate_paths(struct nvme_ns *ns)
{}

static bool nvme_path_is_disabled(struct nvme_ns *ns)
{}

static struct nvme_ns *__nvme_find_path(struct nvme_ns_head *head, int node)
{}

static struct nvme_ns *nvme_next_ns(struct nvme_ns_head *head,
		struct nvme_ns *ns)
{}

static struct nvme_ns *nvme_round_robin_path(struct nvme_ns_head *head)
{}

static struct nvme_ns *nvme_queue_depth_path(struct nvme_ns_head *head)
{}

static inline bool nvme_path_is_optimized(struct nvme_ns *ns)
{}

static struct nvme_ns *nvme_numa_path(struct nvme_ns_head *head)
{}

inline struct nvme_ns *nvme_find_path(struct nvme_ns_head *head)
{}

static bool nvme_available_path(struct nvme_ns_head *head)
{}

static void nvme_ns_head_submit_bio(struct bio *bio)
{}

static int nvme_ns_head_open(struct gendisk *disk, blk_mode_t mode)
{}

static void nvme_ns_head_release(struct gendisk *disk)
{}

static int nvme_ns_head_get_unique_id(struct gendisk *disk, u8 id[16],
		enum blk_unique_id type)
{}

#ifdef CONFIG_BLK_DEV_ZONED
static int nvme_ns_head_report_zones(struct gendisk *disk, sector_t sector,
		unsigned int nr_zones, report_zones_cb cb, void *data)
{}
#else
#define nvme_ns_head_report_zones
#endif /* CONFIG_BLK_DEV_ZONED */

const struct block_device_operations nvme_ns_head_ops =;

static inline struct nvme_ns_head *cdev_to_ns_head(struct cdev *cdev)
{}

static int nvme_ns_head_chr_open(struct inode *inode, struct file *file)
{}

static int nvme_ns_head_chr_release(struct inode *inode, struct file *file)
{}

static const struct file_operations nvme_ns_head_chr_fops =;

static int nvme_add_ns_head_cdev(struct nvme_ns_head *head)
{}

static void nvme_partition_scan_work(struct work_struct *work)
{}

static void nvme_requeue_work(struct work_struct *work)
{}

int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
{}

static void nvme_mpath_set_live(struct nvme_ns *ns)
{}

static int nvme_parse_ana_log(struct nvme_ctrl *ctrl, void *data,
		int (*cb)(struct nvme_ctrl *ctrl, struct nvme_ana_group_desc *,
			void *))
{}

static inline bool nvme_state_is_live(enum nvme_ana_state state)
{}

static void nvme_update_ns_ana_state(struct nvme_ana_group_desc *desc,
		struct nvme_ns *ns)
{}

static int nvme_update_ana_state(struct nvme_ctrl *ctrl,
		struct nvme_ana_group_desc *desc, void *data)
{}

static int nvme_read_ana_log(struct nvme_ctrl *ctrl)
{}

static void nvme_ana_work(struct work_struct *work)
{}

void nvme_mpath_update(struct nvme_ctrl *ctrl)
{}

static void nvme_anatt_timeout(struct timer_list *t)
{}

void nvme_mpath_stop(struct nvme_ctrl *ctrl)
{}

#define SUBSYS_ATTR_RW(_name, _mode, _show, _store)

static ssize_t nvme_subsys_iopolicy_show(struct device *dev,
		struct device_attribute *attr, char *buf)
{}

static void nvme_subsys_iopolicy_update(struct nvme_subsystem *subsys,
		int iopolicy)
{}

static ssize_t nvme_subsys_iopolicy_store(struct device *dev,
		struct device_attribute *attr, const char *buf, size_t count)
{}
SUBSYS_ATTR_RW();

static ssize_t ana_grpid_show(struct device *dev, struct device_attribute *attr,
		char *buf)
{}
DEVICE_ATTR_RO();

static ssize_t ana_state_show(struct device *dev, struct device_attribute *attr,
		char *buf)
{}
DEVICE_ATTR_RO();

static int nvme_lookup_ana_group_desc(struct nvme_ctrl *ctrl,
		struct nvme_ana_group_desc *desc, void *data)
{}

void nvme_mpath_add_disk(struct nvme_ns *ns, __le32 anagrpid)
{}

void nvme_mpath_shutdown_disk(struct nvme_ns_head *head)
{}

void nvme_mpath_remove_disk(struct nvme_ns_head *head)
{}

void nvme_mpath_init_ctrl(struct nvme_ctrl *ctrl)
{}

int nvme_mpath_init_identify(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
{}

void nvme_mpath_uninit(struct nvme_ctrl *ctrl)
{}