#include <linux/vmalloc.h>
#include <linux/bitmap.h>
#include "null_blk.h"
#define CREATE_TRACE_POINTS
#include "trace.h"
#undef pr_fmt
#define pr_fmt(fmt) …
#define NULL_ZONE_INVALID_WP …
static inline sector_t mb_to_sects(unsigned long mb)
{ … }
static inline unsigned int null_zone_no(struct nullb_device *dev, sector_t sect)
{ … }
static inline void null_init_zone_lock(struct nullb_device *dev,
struct nullb_zone *zone)
{ … }
static inline void null_lock_zone(struct nullb_device *dev,
struct nullb_zone *zone)
{ … }
static inline void null_unlock_zone(struct nullb_device *dev,
struct nullb_zone *zone)
{ … }
int null_init_zoned_dev(struct nullb_device *dev,
struct queue_limits *lim)
{ … }
int null_register_zoned_dev(struct nullb *nullb)
{ … }
void null_free_zoned_dev(struct nullb_device *dev)
{ … }
int null_report_zones(struct gendisk *disk, sector_t sector,
unsigned int nr_zones, report_zones_cb cb, void *data)
{ … }
size_t null_zone_valid_read_len(struct nullb *nullb,
sector_t sector, unsigned int len)
{ … }
static void null_close_imp_open_zone(struct nullb_device *dev)
{ … }
static blk_status_t null_check_active(struct nullb_device *dev)
{ … }
static blk_status_t null_check_open(struct nullb_device *dev)
{ … }
static blk_status_t null_check_zone_resources(struct nullb_device *dev,
struct nullb_zone *zone)
{ … }
static blk_status_t null_zone_write(struct nullb_cmd *cmd, sector_t sector,
unsigned int nr_sectors, bool append)
{ … }
static blk_status_t null_open_zone(struct nullb_device *dev,
struct nullb_zone *zone)
{ … }
static blk_status_t null_close_zone(struct nullb_device *dev,
struct nullb_zone *zone)
{ … }
static blk_status_t null_finish_zone(struct nullb_device *dev,
struct nullb_zone *zone)
{ … }
static blk_status_t null_reset_zone(struct nullb_device *dev,
struct nullb_zone *zone)
{ … }
static blk_status_t null_zone_mgmt(struct nullb_cmd *cmd, enum req_op op,
sector_t sector)
{ … }
blk_status_t null_process_zoned_cmd(struct nullb_cmd *cmd, enum req_op op,
sector_t sector, sector_t nr_sectors)
{ … }
static void null_set_zone_cond(struct nullb_device *dev,
struct nullb_zone *zone, enum blk_zone_cond cond)
{ … }
ssize_t zone_cond_store(struct nullb_device *dev, const char *page,
size_t count, enum blk_zone_cond cond)
{ … }