Flash Translation Layer  1.0
Data Structures | Functions
zone.h File Reference

zbd's header file More...

#include <libzbd/zbd.h>
#include "device.h"
Include dependency graph for zone.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  zone_file_descriptor
 containing a zone file's metadata More...
 
struct  zone_meta
 containing a zoned block device's metadata More...
 

Functions

int zone_open (struct device *, const char *name, int flags)
 open the zoned block deivce file More...
 
ssize_t zone_write (struct device *, struct device_request *)
 write to the zoned block device More...
 
ssize_t zone_read (struct device *, struct device_request *)
 read to the zoned block device More...
 
int zone_erase (struct device *, struct device_request *)
 erase the segment to the zoned block device More...
 
int zone_close (struct device *)
 close the zoned block device More...
 
int zone_device_init (struct device *, uint64_t flags)
 initialize the device module More...
 
int zone_device_exit (struct device *)
 deallocate the device module More...
 
static uint64_t zone_get_zone_number (struct device *dev, struct device_address paddr)
 

Detailed Description

zbd's header file

Author
Gijun Oh
Version
0.2
Date
2021-10-09

Function Documentation

◆ zone_close()

int zone_close ( struct device dev)

close the zoned block device

Parameters
devpointer of the device structure
Returns
0 for success, negative number for fail

◆ zone_device_exit()

int zone_device_exit ( struct device dev)

deallocate the device module

Parameters
devpointer of the device structure
Returns
0 for success, negative value for fail
Here is the call graph for this function:

◆ zone_device_init()

int zone_device_init ( struct device dev,
uint64_t  flags 
)

initialize the device module

Parameters
devpointer of the device structure
flagsflags for ramdisk and device
Returns
0 for sucess, negative value for fail
Here is the call graph for this function:

◆ zone_erase()

int zone_erase ( struct device dev,
struct device_request request 
)

erase the segment to the zoned block device

Parameters
devpointer of the device structre
requestpointer of the user request
Returns
0 for success, negative number for fail

◆ zone_get_zone_number()

static uint64_t zone_get_zone_number ( struct device dev,
struct device_address  paddr 
)
static
Here is the call graph for this function:

◆ zone_open()

int zone_open ( struct device dev,
const char *  name,
int  flags 
)

open the zoned block deivce file

Parameters
devpointer of the device structure
namezoned block device's device filename
flagsopen flags for ramdisk
Returns
0 for success, negative number for fail
Here is the call graph for this function:

◆ zone_read()

ssize_t zone_read ( struct device dev,
struct device_request request 
)

read to the zoned block device

Parameters
devpointer of the device structre
requestpointer of the user request
Returns
the number of bytes to read, negative number for fail
Here is the call graph for this function:

◆ zone_write()

ssize_t zone_write ( struct device dev,
struct device_request request 
)

write to the zoned block device

Parameters
devpointer of the device structre
requestpointer of the user request
Returns
the number of bytes to write, negative number for fail
Here is the call graph for this function: