linux/drivers/nvme/target/zns.c

// SPDX-License-Identifier: GPL-2.0
/*
 * NVMe ZNS-ZBD command implementation.
 * Copyright (C) 2021 Western Digital Corporation or its affiliates.
 */
#define pr_fmt(fmt)
#include <linux/nvme.h>
#include <linux/blkdev.h>
#include "nvmet.h"

/*
 * We set the Memory Page Size Minimum (MPSMIN) for target controller to 0
 * which gets added by 12 in the nvme_enable_ctrl() which results in 2^12 = 4k
 * as page_shift value. When calculating the ZASL use shift by 12.
 */
#define NVMET_MPSMIN_SHIFT

static inline u8 nvmet_zasl(unsigned int zone_append_sects)
{}

static int validate_conv_zones_cb(struct blk_zone *z,
				  unsigned int i, void *data)
{}

bool nvmet_bdev_zns_enable(struct nvmet_ns *ns)
{}

void nvmet_execute_identify_ctrl_zns(struct nvmet_req *req)
{}

void nvmet_execute_identify_ns_zns(struct nvmet_req *req)
{}

static u16 nvmet_bdev_validate_zone_mgmt_recv(struct nvmet_req *req)
{}

struct nvmet_report_zone_data {};

static int nvmet_bdev_report_zone_cb(struct blk_zone *z, unsigned i, void *d)
{}

static unsigned long nvmet_req_nr_zones_from_slba(struct nvmet_req *req)
{}

static unsigned long get_nr_zones_from_buf(struct nvmet_req *req, u32 bufsize)
{}

static void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
{}

void nvmet_bdev_execute_zone_mgmt_recv(struct nvmet_req *req)
{}

static inline enum req_op zsa_req_op(u8 zsa)
{}

static u16 blkdev_zone_mgmt_errno_to_nvme_status(int ret)
{}

struct nvmet_zone_mgmt_send_all_data {};

static int zmgmt_send_scan_cb(struct blk_zone *z, unsigned i, void *d)
{}

static u16 nvmet_bdev_zone_mgmt_emulate_all(struct nvmet_req *req)
{}

static u16 nvmet_bdev_execute_zmgmt_send_all(struct nvmet_req *req)
{}

static void nvmet_bdev_zmgmt_send_work(struct work_struct *w)
{}

void nvmet_bdev_execute_zone_mgmt_send(struct nvmet_req *req)
{}

static void nvmet_bdev_zone_append_bio_done(struct bio *bio)
{}

void nvmet_bdev_execute_zone_append(struct nvmet_req *req)
{}

u16 nvmet_bdev_zns_parse_io_cmd(struct nvmet_req *req)
{}